ansible icon indicating copy to clipboard operation
ansible copied to clipboard

Suggestion: visudo in lineinfile

Open vikas027 opened this issue 9 years ago • 0 comments

Excellent collection of playbooks. I have a suggestion for sudo playbook. We can use validate with lineinfile module with something like this

- lineinfile: dest=/etc/sudoers state=present line='%My_Group   ALL=(ALL)       NOPASSWD{{':'}} ALL' validate='visudo -cf %s'

I just thought it would be useful for your followers. Thanks.

vikas027 avatar Sep 07 '15 16:09 vikas027