- stat: path=/tmp/test.log register: result changed_when: False - debug: var=result - fail: msg="file not found" when: result.stat.exists == False
- stat: path=/tmp/test register: result changed_when: False - debug: var=result - fail: msg="directory not found" when: result.stat.exists == False or result.stat.isdir == False
- local_action: module: stat path: /tmp/test.log
- assert: fail_msg: "Please enter correct var1" that: - var1 is defined - var1 - var1|trim
PukiWiki 1.5.3 © 2001-2020 PukiWiki Development Team. Powered by PHP 7.4.33. HTML convert time: 0.048 sec.