logo-MindMajix
v
veerubhotla sowmithri

Posted on 21st June 2024|77 views

0
votes

Ansible Check If File Exists

How to check whether the file exits or not?

1 answers
Answers
P
Harshel Mike

Posted on 21st June 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)

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo

  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos
Name
Course *
Email *
Phone Number