Added 'validate' feature to copy and template modules, now you can add a check to force copy to fail if the check fails.

had to add entry in file for it to accept as a option even though file itself ignores it.
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
This commit is contained in:
Brian Coca
2013-03-26 23:12:56 -04:00
parent 95f30f0def
commit a0422bd534
3 changed files with 24 additions and 2 deletions

View File

@@ -140,7 +140,8 @@ def main():
state = dict(choices=['file','directory','link','absent'], default='file'),
path = dict(aliases=['dest', 'name'], required=True),
recurse = dict(default='no', type='bool'),
diff_peek = dict(default=None)
diff_peek = dict(default=None),
validate = dict(required=False, default=None),
),
add_file_common_args=True,
supports_check_mode=True