I feel a right bit nit wit,  Foiled again by indentation.  Uggg.
back that register up,  beep beep beep beep.
now it works great and stands tall above all useful modules, ummm, as
always.

- name: remove sssd.conf:debug_level = 9 (X)
  lineinfile: >
      dest="/etc/sssd/sssd.conf"
      state=absent
      backup=yes
      regexp="^debug_level ="
*  register: sssdConf*

  - name: test command
    shell: "echo sssd.conf has debug_level set > /tnp/sssd.debug.check"
    when: sssdConf is changed

On Thu, Jan 10, 2019 at 11:19 PM Eric Clifford <e.clifford...@gmail.com>
wrote:

> #  Someday, this will work , when the developer adds support for when
> changed :)
> #- name: remove sssd.conf:debug_level = 9 (X)
> #  lineinfile: >
> #      dest="/etc/sssd/sssd.conf"
> #      state=absent
> #      backup=yes
> #      regexp="^debug_level ="
> #      register: sssdConf
> #
> #  - name: test command
> #    shell: "echo sssd.conf has debug_level set > /tnp/sssd.debug.check"
> #    when: sssdConf is changed  or  when: sssdConf.rc == 0 . nether of
> which work,  doink, double doink. (doink is a missed fieldgoal that hits
> the upright or crossbar or both)
>
> I'd really like to to use the when in subsequent plays but lineinfile ,
> unlike all other plays I've used, does not support that.
> I know some python, I'd love to help.... may i ?
>
> oh, I think I read somewhere that lineinfile was being eliminated in
> future releases.  Ummmm, no,  please, please no, for the love of ansible,
> Nooooooo.  Seriously, it's like the
> superMostBestest play for files.  Except for the shortcoming on the return
> usage.
>
> thanks
> Eric Clifford.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-devel+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to