Search code examples
ansiblerundeck

Where do you target your hosts, in Rundeck or Ansible?


My question is when running a ansible playbook from Rundeck where do i set what hosts get targeted? In the Rundeck job/ workflow or ansible playbook?


Solution

  • To use Ansible inventory you need to add a new Ansible node source. Take a look at this. Especially the step 3.

    Adding the Ansible node source in Rundeck you can see the Ansible inventory (usually at /etc/ansible/hosts) in your Rundeck node list. So, you can use both node sources (Ansible inventory defined before and Rundeck inventory: maybe resources.xml file or resources.yml),

    That means that you can point your playbooks and command steps/scripts to Ansible/Rundeck nodes without problems using "dispatch to nodes" in Rundeck job definition.