I am currently exploring Runddeck to manage several 100 VMs at the time. Rundeck is a very useful tool to run scripts/ commands on multiple machines at the time (each script is passed to the remote machine and then executed locally). However I wonder if there is a way of implementing the following system administation scenario.
Rundeck job requirments (Example: Observium)
- "Dispatch to Nodes" option selected but only one target machine selected (Observium machine).
- Despite of running the job on only one machine, it would be great if Rundeck allows to select multiple machines, which the script requires. Note, the script is not supposed to be run on all nodes, it's only supposed to be run on a single remote machine but the script requires the list of machines. [How can this be done?]
- The script gets access to the list of machines as parameter. [How can this be done?]
- If the above is in place, the script then runs on only one machine and iterates through the list of machines
==> For example, it runs
/opt/observium/add_device.php v2c @node.name@ ${varSNMPCommunity}
I don't have enough reputation to include images in this post. Please use the link below to see the flow diagram.
https://www.dropbox.com/s/2zt4r9trulpsaqx/RundeckObservium.png?dl=0
if you want to run your script on your rundeck machine and the script will do remote ssh itself to the target machines then you have to select the local machine only in rundeck. Then in the script you can call rundeck to deliver the machine list for the project. e.g. in bash you can do the folowing
The following example will give you the list of those nodes from test_project which have a tag set to app.