Posted on 10th September 2024|77 views
How to check whether the file exits or not?
Posted on 10th September 2024| views
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)