mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 21:30:22 -07:00
Ensure the validation string has %s in it
This commit is contained in:
parent
c5e9a06c2a
commit
a34478d6f3
3 changed files with 6 additions and 0 deletions
|
@ -154,6 +154,8 @@ def write_changes(module,lines,dest):
|
|||
validate = module.params.get('validate', None)
|
||||
valid = not validate
|
||||
if validate:
|
||||
if "%s" not in validate:
|
||||
module.fail_json(msg="validate must contain %%s: %s" % (validate))
|
||||
(rc, out, err) = module.run_command(validate % tmpfile)
|
||||
valid = rc == 0
|
||||
if rc != 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue