Execute (Ansible) Jobs on nodes in parallel, but avoid from same "type" / role

27 views
Skip to first unread message

denny....@gmail.com

unread,
Oct 27, 2021, 5:51:35 AM10/27/21
to rundeck-discuss
Hello,

we update our systems with Rundeck and Ansible at the moment in sequential (one node at a time) order, which takes a lot of time.

our systems are like:

dc-01-proxy-01 / dc-01-proxy-02 / dc-01-proxy-03 / ...

so, it is pretty bad .. if we say .. "Updated 4 nodes at the same time" in parallel, because all dc-01-proxy- goes down at the same time :-)

Is there a way .. to upgrade only 1 node, if there is more from the same type ? 

So, upgrade dc-01-proxy-01 and choose a different node, like dc-01-app-01, dc-01-web-01 .. ? 

cu denny

denny....@gmail.com

unread,
Oct 27, 2021, 6:31:04 AM10/27/21
to rundeck-discuss
I try to solve it with the inventory from Ansible .. and create "pools"

rac...@rundeck.com

unread,
Oct 27, 2021, 9:15:58 AM10/27/21
to rundeck-discuss
Hi Denny,

Try with Node enhancer, you can create a custom attribute and later use it as a filter.

Hope it helps!

denny....@gmail.com

unread,
Oct 28, 2021, 7:04:05 AM10/28/21
to rundeck-discuss
hi,

hmm, node enhancer ... no idea how to use it. I've search in Google .. and may I can add a something like, add all with ".*01" to a pool1 ... but it sounds more complex .. 

I testing something like that:

* inventory/prod/hosts

[dc_01_pool_01]
[dc_01_pool_02]
and change in the "inventory" param in the Rundeck Workflow from a "inventory=fc_01" to "inventory=dc_01_pool_01" and duplicate the workflow for every pool, but with changed "inventory" var. So because the Rundeck Workflow is sequential .. it will first finish pool_01 than, pool_02 etc. pp. But I can try to tell Rundeck, to make 4 nodes at a time. I hope. Have to test it .. if it realy works that way. If not. I will duplicate the whole job.

cu denny
Reply all
Reply to author
Forward
0 new messages