Reputation: 104
I am trying to run Ansible playbook stored in my local drive. I am using wsl 2 which is where I have installed Ansible and Rundeck.
Playbook path: /home/hannan/wslNodeRedProjects/ansible/myplaybook1.yml
On providing the correct location of the playbook I get the following errors:
ERROR! the playbook: /home/hannan/wslNodeRedProjects/ansible/myplaybook1.yml could not be found
*Failed: AnsibleNonZero: ERROR: Ansible execution returned with non zero code. *
I am not sure why I am getting an error even after specifying the correct location.
I wanted to know if I am missing anything or should I need to provide other options like Ansible binaries directory path as well.
Upvotes: 0
Views: 587
Reputation: 158
This error might indicate that the user establishing the local SSH connection to execute the playbook (default: rundeck
) doesn't have executable permissions to the full playbook path.
This could be resolved by either using a user with the right executable permissions, or by granting executable permissions to the specific user with ACL, like so:
$ setfacl -R -m user:rundeck:x /path/to/playbook/
setfacl
- set file access control lists.-R, --recursive
-
apply operations to all files and directories recursively.-m, --modify
-
modify the ACL of a file or directory. ACL entries for this operation must include permissions.See man setfacl
for further reading.
Upvotes: 2