From 8960cba4a31bb3ecf6d397f251a875b0097f6c15 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Wed, 26 Mar 2014 12:42:15 -0500 Subject: [PATCH] Fixed template validation docs and example. --- library/files/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/files/template b/library/files/template index 39f92c72a72..3f2ea5bbf5e 100644 --- a/library/files/template +++ b/library/files/template @@ -40,7 +40,7 @@ options: default: "no" validate: description: - - validation to run before copying into place + - The validation command to run before copying into place. The path to the file to validate is passed in via '%s' which must be present as in the visudo example below. (added in Ansible 1.2) required: false default: "" version_added: "1.2" @@ -63,6 +63,6 @@ EXAMPLES = ''' # Example from Ansible Playbooks - template: src=/mytemplates/foo.j2 dest=/etc/file.conf owner=bin group=wheel mode=0644 -# Copy a new "sudoers file into place, after passing validation with visudo -- action: template src=/mine/sudoers dest=/etc/sudoers validate='visudo -cf %s' +# Copy a new "sudoers" file into place, after passing validation with visudo +- template: src=/mine/sudoers dest=/etc/sudoers validate='visudo -cf %s' '''