# lineinfile module needs return code standard for when: in subsequent plays.

**URL:** <https://forum.ansible.com/t/lineinfile-module-needs-return-code-standard-for-when-in-subsequent-plays/29423>\
**Category:** Ansible Developer\
**Created:** [January 11, 2019, 4:18am UTC](https://forum.ansible.com/t/lineinfile-module-needs-return-code-standard-for-when-in-subsequent-plays/29423 "2019-01-11T04:18:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Clifford](https://avatars.discourse-cdn.com/v4/letter/e/ac91a4/32.png) [@Eric\_Clifford](https://forum.ansible.com/u/Eric_Clifford)\
**Post date:** [January 11, 2019, 4:18am UTC](https://forum.ansible.com/t/lineinfile-module-needs-return-code-standard-for-when-in-subsequent-plays/29423/1 "2019-01-11T04:18:57Z")

</div>

# 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

---

<div class="post-metadata">

**Author:** ![Eric\_Clifford](https://avatars.discourse-cdn.com/v4/letter/e/ac91a4/32.png) [@Eric\_Clifford](https://forum.ansible.com/u/Eric_Clifford)\
**Post date:** [January 15, 2019, 6:05pm UTC](https://forum.ansible.com/t/lineinfile-module-needs-return-code-standard-for-when-in-subsequent-plays/29423/2 "2019-01-15T18:05:02Z")

</div>

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
