On 14.08.2019 21:12, Larry Kyrala wrote:
"matched": 0,
"msg": "deployments/ was skipped as it does not seem to be a valid
directory or it cannot be accessed\n"
}
# script that is failing - deploy/main.yml:
- name: find deployments
find:
paths: deployments/
patterns: "*.json"
excludes: "sample_deployment.json"
register: files_matched
# directory permissions from within the VM:
It can be a few possibilities, since you are using relative path it
might not search in correct paths.
The easiest way to see what happens might be strace on the failing
machine
strace -f ansible-playbook deploy.yml --ask-become-pass 2>&1 | grep
deployments
This will show every system call against deployments
The find module stops after it test deployments/ is a directory with
os.path.isdir, you can test it with this code and is should print True,
since you are using become you should run this with sudo.
sudo -H python -c 'import os; print os.path.isdir("deployments/")'
--
Kai Stian Olstad
--
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/c14f136f4e4c3e15ec611cadb3deae15%40olstad.com.