Open marcheschi opened 7 years ago
I forgot to say that also added an Ansible Resource Model Source with the path to the hosts file
Have you tried executing a playbook/module as rundeck user? Does the su rundeck -s /bin/bash -c "ansible all -m ping"
actually finds the hosts file and pings the host node?
Try also to disable "Gather Facts" option from Ansible Resource Model Source.
When running a job or a command, the plugin does not take into account the inventory file specified in the resources model source. It takes in that order the inventory file specified in:
I fixed a similar issue by adding project.ansible-inventory=/path/to/hosts to my project configuration. Unfortunately, I don't konw how to specify the host file at the job level yet.
I ran into the same issue. Isn't it confusing to specify a hosts file/inventory in the resource model source, which is NOT used when actually using ansible? It would make sense to use the inventory specified consistently with every ansible action in the project.
Yes, I noticed this too and took a quick look a while ago. The imported nodes need a reference to the resource model, which created them (as there can be multiple per project), so they can get the settings. Haven't found a reference in Rundeck yet, so maybe we'd need to save the ref on node import, if possible.
@marcheschi @FritsHoogland Can you check this with the latest version please?
I'm using 2.5.0 and it still has the same behaviour.
Hi,
I'm trying to pass ansible hosts file to job execution, i tried module execution or playbook but I get always:
No config file found; using defaults
15:18:54 | | | [WARNING]: Host file not found: /etc/ansible/hosts 15:18:54 | | | [WARNING]: provided hosts list is empty, only localhost is available 15:18:54 | | | [WARNING]: No hosts matched, nothing to do
in the project I can import correctly the nodes , actually I have only one node to make it simpler and it shows up, and also on job creation. Is there an example tutorial where I can find more information on how to pass hosts file to playbook or to module ? Thank you Paolo