Warm tip: This article is reproduced from stackoverflow.com, please click
ansible rundeck ubuntu-18.04

Rundeck integration with Ansible through plugin

发布于 2020-04-08 09:21:58

I am not able to configure the rundeck integration with ansible, I am using the rundeck-ansible plugin, but I am not getting easy and useful information/help from google. I have installed ansible and rundeck on the same server. I have used that plugin https://github.com/Batix/rundeck-ansible-plugin but not able to configure it. can anyone please share the link which h guide step by step. Any help will be appreciated.

Questioner
M Salahuddin
Viewed
66
MegaDrive68k 2020-02-04 05:13

Keep on mind that the Ansible plugin is out of the box with Rundeck, basically, you need to follow this:

  1. Create a new project, go to the "Default Node Executor" tab and select "Ansible Ad-hoc Node Executor". Take a look.

  2. In the Ansible Node Executor configuration, set the Executable (usually /bin/bash) and define the Ansible config path (usually at /etc/ansible/ansible.cfg), also click ON "Generate Inventory" checkbox. Now scroll down and click on "Save" button.

  3. You need to get the ansible nodes defined in your Ansible inventory. For that click on "Project Settings", click on "Edit Nodes..." and then on "Add new Node Source +" green button. Take a look. Choose "Ansible Resource Model Source" and define your Ansible inventory file path (usually at /etc/ansible/hosts) and Ansible config path (usually at /etc/ansible/ansible.cfg). With this, just scroll down and click on the "Save" green button. Now if you click on the "Nodes" option in the left panel, you can see the nodes defined in your Ansible inventory.
  4. Is time for a little test, go to Commands option in the left panel, in the Nodes section then select some Ansible node defined in your Ansible inventory and run some command, in the example, I used "ls -a", take a look.
  5. Now you can run any command/playbooks/inline-playbooks over your ansible nodes and/or use Rundeck nodes to run Ansible playbooks/inline-playbooks, with this you can design any workflow that involves ansible nodes and/or playbooks.

You can watch this to learn more about run Ansible playbooks (and use inline Ansible playbooks) in Rundeck.