问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/60210895/where-do-you-target-your-hosts-in-rundeck-or-ansible