# lineinfile .  module not running

**URL:** <https://forum.ansible.com/t/lineinfile-module-not-running/29471>\
**Category:** Ansible Project\
**Created:** [January 18, 2019, 8:47pm UTC](https://forum.ansible.com/t/lineinfile-module-not-running/29471 "2019-01-18T20:47:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![computerprosupport](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@computerprosupport](https://forum.ansible.com/u/computerprosupport)\
**Post date:** [January 18, 2019, 8:47pm UTC](https://forum.ansible.com/t/lineinfile-module-not-running/29471/1 "2019-01-18T20:47:43Z")

</div>

This playbook is not running. Can anyone tell me why?  
Running on Linux CentOS 6.6  
ansible 2.6.4

ansible-playbook -i hosts plays/sudoers.yml -u ansible-user

- name: add groups to sudoers  
hosts: all  
tasks:
- name:  
lineinfile: dest=/etc/sudoers regexp=“^root(\s+)ALL=(ALL)(\s+)ALL” insertafter=“^root” line=‘{{ item }}’ state=present backup=yes backrefs=yes  
with\_items:
- ‘%admin\tALL=(ALL:ALL)\tALL’
- ‘%users\tALL=(ALL:ALL)\tALL’  
tags: sudoers

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [January 18, 2019, 9:52pm UTC](https://forum.ansible.com/t/lineinfile-module-not-running/29471/2 "2019-01-18T21:52:30Z")

</div>

Could you be more precise than "playbook is not running"?  
What does that mean?

---

<div class="post-metadata">

**Author:** ![computerprosupport](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@computerprosupport](https://forum.ansible.com/u/computerprosupport)\
**Post date:** [January 18, 2019, 10:13pm UTC](https://forum.ansible.com/t/lineinfile-module-not-running/29471/3 "2019-01-18T22:13:51Z")

</div>

When i run the play the result shows

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
xxx-test-noc : ok=2 changed=0 unreachable=0 failed=0

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [January 22, 2019, 11:13am UTC](https://forum.ansible.com/t/lineinfile-module-not-running/29471/4 "2019-01-22T11:13:09Z")

</div>

This means it did run, and successfully as well, because no changes  
were required (i.e. things are at their desired state).

Dick
