Comment on page
File Exists
This assertion type helps you to verify if a certain directory exists.
Provide a TRUE (1) as expected to check that the file should exist.
file_exists:
- name: "SSH Private Key exists"
file: "/var/www/.ssh/id_rsa"
expected: 1
Provide a FALSE (0) as expected to check that the file does not exist at all.
file_exists:
- name: "SSH Private Key must not exist"
file: "/var/www/.ssh/id_rsa"
expected: 0
Last modified 1yr ago