Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible-playbook 01_general-server-configuration.yml fails at "TASK [chrisvanmeer.hashicorp : Include right OS task file.]" #5

Open
JalfResi opened this issue Mar 15, 2024 · 3 comments

Comments

@JalfResi
Copy link

fatal: [server1]: FAILED! =>
reason: Could not find or access '/home/bendavies/at-hashi-demo/setup-hashicorp-Ubuntu.yml' on the Ansible Controller.
fatal: [server2]: FAILED! =>
reason: Could not find or access '/home/bendavies/at-hashi-demo/setup-hashicorp-Ubuntu.yml' on the Ansible Controller.
fatal: [server3]: FAILED! =>
reason: Could not find or access '/home/bendavies/at-hashi-demo/setup-hashicorp-Ubuntu.yml' on the Ansible Controller.
fatal: [client1]: FAILED! =>
reason: Could not find or access '/home/bendavies/at-hashi-demo/setup-hashicorp-Ubuntu.yml' on the Ansible Controller.
fatal: [client2]: FAILED! =>
reason: Could not find or access '/home/bendavies/at-hashi-demo/setup-hashicorp-Ubuntu.yml' on the Ansible Controller.
fatal: [client3]: FAILED! =>
reason: Could not find or access '/home/bendavies/at-hashi-demo/setup-hashicorp-Ubuntu.yml' on the Ansible Controller.
fatal: [client4]: FAILED! =>
reason: Could not find or access '/home/bendavies/at-hashi-demo/setup-hashicorp-Ubuntu.yml' on the Ansible Controller.

Later on, this causes "ansible-playbook 03_consul-deployment.yml" to fail with "TASK [HashiCorp - Consul : Ensure data directory is present.]"

@chrisvanmeer
Copy link
Owner

Did you forget to install the role or edit any of the code perhaps?
I can't see why this is happening.

@JalfResi
Copy link
Author

Nope, installed the roles and didnt edit any of the code. Bizzarly, when I add a symbolic link:

ln -s /home/bendavies/at-hashicorp-demo/set-hashicorp-Ubuntu.yml /home/bendavies/.ansible/roles/chrisvanmeer.hashicorp/tasks/setup-hashicorp-Debian.yml

it appears to work.

Not particulary familiar with Ansible yet - but why would the "Include right OS task file" task look in the project root for the role?

@chrisvanmeer
Copy link
Owner

Sounds like you have a roles_path defined in an Ansible config somewhere with ./ as value that overwrites.

If I use the role, I see a task

TASK [chrisvanmeer.hashicorp : Include right OS task file.] ***************************************************************************************
included: /Users/chris/.ansible/roles/chrisvanmeer.hashicorp/tasks/setup-hashicorp-Ubuntu.yml for acme-vault1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants