Commit 573ea5bd by René Moser

file: skip in check_mode if state=touched

parent 06fae59e
......@@ -310,6 +310,9 @@ def main():
module.exit_json(dest=path, src=src, changed=changed)
elif state == 'touched':
if module.check_mode:
module.exit_json(path=path, skipped=True)
if prev_state not in ['file', 'directory', 'absent']:
module.fail_json(msg='Cannot touch other than files and directories')
if prev_state != 'absent':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment