provide usable examples for sudo validation
This commit is contained in:
parent
48922660fe
commit
7a35b95609
3 changed files with 4 additions and 4 deletions
|
@ -143,14 +143,14 @@ EXAMPLES = r'''
|
|||
- copy:
|
||||
src: /mine/sudoers
|
||||
dest: /etc/sudoers
|
||||
validate: visudo -cf %s
|
||||
validate: /usr/sbin/visudo -cf %s
|
||||
|
||||
# Copy a "sudoers" file on the remote machine for editing
|
||||
- copy:
|
||||
src: /etc/sudoers
|
||||
dest: /etc/sudoers.edit
|
||||
remote_src: yes
|
||||
validate: visudo -cf %s
|
||||
validate: /usr/sbin/visudo -cf %s
|
||||
|
||||
# Create a CSV file from your complete inventory using an inline template
|
||||
- hosts: all
|
||||
|
|
|
@ -184,7 +184,7 @@ EXAMPLES = r"""
|
|||
state: present
|
||||
regexp: '^%ADMIN ALL='
|
||||
line: '%ADMIN ALL=(ALL) NOPASSWD: ALL'
|
||||
validate: 'visudo -cf %s'
|
||||
validate: '/usr/sbin/visudo -cf %s'
|
||||
"""
|
||||
|
||||
import re
|
||||
|
|
|
@ -137,7 +137,7 @@ EXAMPLES = r'''
|
|||
- template:
|
||||
src: /mine/sudoers
|
||||
dest: /etc/sudoers
|
||||
validate: 'visudo -cf %s'
|
||||
validate: '/usr/sbin/visudo -cf %s'
|
||||
|
||||
# Update sshd configuration safely, avoid locking yourself out
|
||||
- template:
|
||||
|
|
Loading…
Reference in a new issue