provide usable examples for sudo validation

pull/27251/head
Pete Travis 7 years ago committed by Brian Coca
parent 48922660fe
commit 7a35b95609

@ -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…
Cancel
Save