One job, multiple Nodes OS Types

218 views
Skip to first unread message

Chad Robinson

unread,
Jan 10, 2022, 11:47:28 AM1/10/22
to rundeck-discuss

Hello Everyone, 

    I have a situation where I'd like to write jobs, being OS agnostic. Specifically I want them to run on UNIX or windows. One problem I see, is not having the ability to specify executing one node step as a script for Windows AND Linux. Now I understand there's a default node executor and file copier for the project, but that wont work for this use case. In addition, I can't specify a particular nodes node executor/file copier, because I'm using Ansibles inventory to populate my nodes. 

Please correct me if I'm wrong, because I'm interested in learning more. 

It'd be nice to have a conditional check as a node step, that says to run this windows script for windows and this linux/bash script for linux. 

rac...@rundeck.com

unread,
Jan 10, 2022, 12:28:19 PM1/10/22
to rundeck-discuss

Hi Chad,

In Ansible I use this kind of inventory for “mixed” nodes:

[the_farm]
192.168.33.20
192.168.33.21
192.168.33.22

[windowze]
192.168.1.84 ansible_shell_type=powershell

[the_farm:vars]
ansible_user=vagrant

[windowze:vars]
ansible_user=administrator
ansible_password=win_passord
ansible_port=5985
ansible_connection=winrm
ansible_winrm_scheme=http
ansible_winrm_server_cert_validation=ignore

In that way, you can dispatch “agnostic” commands/jobs using Rundeck.

In addition, take a look at this thread if you want to do the same using a Rundeck file model source. Using the node-executor attribute you can define the node executor of each node in your XML/YAML node definition.

Hope it helps!

Chad Robinson

unread,
Jan 10, 2022, 1:25:40 PM1/10/22
to rundeck-discuss
You actually reminded me that I can just use Ansible to perform some actions, where-as I was using Rundeck Node Steps. 

I do think that if Rundeck did provide this conditional check, it would be possible. I'd like to avoid using Ansible, as an additional layer when Rundeck does exactly that. The benefit I see for Ansible in my use-case is simply for the inventory management. 

Chad Robinson

unread,
Jan 10, 2022, 1:26:54 PM1/10/22
to rundeck-discuss
 A reason for avoiding Ansible steps in a job, is because of the reporting that comes back. Filtering the output logs makes it more complicated in the end.
Reply all
Reply to author
Forward
0 new messages