provide usable examples for sudo validation

This commit is contained in:
Pete Travis 2017-08-02 16:24:11 -05:00 committed by Brian Coca
parent 48922660fe
commit 7a35b95609
3 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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: