问题
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.
回答1:
Keep on mind that the Ansible plugin is out of the box with Rundeck, basically, you need to follow this:
Create a new project, go to the "Default Node Executor" tab and select "Ansible Ad-hoc Node Executor". Take a look.
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.- 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. - 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.
- 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.
来源:https://stackoverflow.com/questions/60011639/rundeck-integration-with-ansible-through-plugin