Open r0039 opened 2 years ago
Hi,
com.batix.rundeck.plugins.AnsiblePlaybookWorflowNodeStep is designed (just like all other node steps) to be executed on each node selected in the node filter.
Therefore, the plugin uses the --limit option by design (when you run in debug mode you can see the ansible-playbook command passed with all the parameters).
Targeting multiple hosts in a playbook inside a Node step is not possible since Rundeck will limit it to the node it's executing on.
To accomplish what you want you would need:
new_hostname
and old_hostname
inside your ansible playbook file directly (you can pass those values from Rundeck options to extra-vars)
Hi, Firstly, I would like to thank for your contribution :-)
Now I am having an issue. Somehow rundeck var could not pass into Ansible playbook. I am using the type:
com.batix.rundeck.plugins.AnsiblePlaybookWorflowNodeStep
.Here is my code: /rundeck/templates/ansible/se/jira/redeploy_jira.yaml
/ansible/playbooks/se/redeploy/jira/redeploy.yaml
My idea: I want to use
nodefilters
of rundeck job, then I pass its value intoold_hostname: '${node.name}'
. Thus I change:type: com.batix.rundeck.plugins.AnsiblePlaybookWorkflowStep
totype: com.batix.rundeck.plugins.AnsiblePlaybookWorflowNodeStep
nodeStep: true
.Implementation In rundeck UI, I input
new_hostname
and selectold_hostname
fromChange the Target Nodes.
It works! However,
new_hostname
could not pass into Ansible Playbook. Also, I already declared this oneansible-disable-limit: 'false'
, but --limit still existed.My question: Can I use
new_hostname
andold_hostname on this case? Can
ansible-disable-limit: 'false'work with
type: com.batix.rundeck.plugins.AnsiblePlaybookWorflowNodeStepand
nodeStep: true`?I spend a lot of time, but still could not solve this issue. I am appreciate your help. Thanks a lot!