I have a problem checking if a file exists:
- name: Check if ssh key exists
stat: path= "/config/clients/ssh_keys/daniel_nanboe.pub"
register: exista
- debug: var=exista
- fail:
msg: Stop
The file exists but the stat returns false:
"exista": {
"changed": false,
"failed": false,
"stat": {
"exists": false
}
}
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/72841c12-fda7-4df3-bc78-2997857a684f%40googlegroups.com.