Post
Ansible
Posted on 19th April 2024|74 views
How to check whether the file exits or not?
Posted on 19th April 2024
In Ansible, we can check the existence of the file through the code:
-name: check the file
command: Sample.txt
when: $(! -s /c/Sample.txt)
STILL GOT QUERIES?