lineinfile . module not running

47 views
Skip to first unread message

computerp...@gmail.com

unread,
Jan 18, 2019, 3:47:43 PM1/18/19
to Ansible Project
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

Dick Visser

unread,
Jan 18, 2019, 4:52:49 PM1/18/19
to ansible...@googlegroups.com
Could you be more precise than "playbook is not running"?
What does that mean?
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/75bd9b1a-9f73-4759-aada-50e99ac5d3f6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

computerp...@gmail.com

unread,
Jan 18, 2019, 5:13:51 PM1/18/19
to Ansible Project
When i run the play the result shows

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

Dick Visser

unread,
Jan 22, 2019, 6:13:29 AM1/22/19
to ansible...@googlegroups.com
On Fri, 18 Jan 2019 at 23:14, <computerp...@gmail.com> wrote:
>
> When i run the play the result shows
>
> PLAY RECAP *****************************************************************************************************************************************
> xxx-test-noc : ok=2 changed=0 unreachable=0 failed=0

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

Dick
Reply all
Reply to author
Forward
0 new messages