Help configuring rundeck job to run ansible playbook

706 views
Skip to first unread message

Kobi Rosenstein

unread,
Apr 5, 2020, 5:37:49 AM4/5/20
to rundeck-discuss
I have a project with a single remote node, on which Ansible is installed .
I can run an ansible playbook by through Rundeck if I use the "command" option. It works fine and returns the proper values I expect.
However, if I use the "Ansible playbook worflow node step" option, I always get an error saying:
Failed: IOFailure: ERROR: Ansible IO failure: Cannot run program
"ansible-playbook" (in directory "/home/tuser/playbooks"): error=2, No
such file
or directory

I have "Ansible base directory path" set to /home/tuser/playbooks, and "Playbook" has an absolute path: "/home/tuser/playbooks/playbook.yml"

How am I supposed to use the native ansibe features and not have to resort to manually running things as commands?

Reiner Acuña

unread,
Apr 5, 2020, 12:26:44 PM4/5/20
to rundeck-discuss
Hi Kobi,

The ansible plugin is designed keeping in mind that Ansible and Rundeck are coexisting in the same server (because the plugin needs the ansible.cfg path and host file path to get the configuration and ansible inventory),  that output is because you don't have that binary in your Rundeck server.

You can follow these steps to configure Ansible with Rundeck correctly (screenshots included):

https://stackoverflow.com/a/60019714/10426011

Also, you can check this video:

https://www.youtube.com/watch?v=jNjcPJeLVxo

If you need to run ansible-playbook from the remote server you can call the command from a command step or script step (as you say).

Regards!

Francesca Wise

unread,
Apr 5, 2020, 12:51:13 PM4/5/20
to rundeck...@googlegroups.com
In playbook you only put the file name not the full path. The base path is the location of the playbook.

--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rundeck-discuss/a9d60d64-c5e3-48fa-b90f-062ec4e95256%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages