3

I have a main Rundeck job with an option hostname(node).

And in this main Job I have a step Job Reference. and I would like to execute a command on the hostname passed as an argument.

Is that possible and how to do that ?

Thanks

Stranger B.
  • 9,004
  • 21
  • 71
  • 108

1 Answers1

2

Yes, it is possible. You can use option passed into job as part of nodes filter. For example jobA reference JobB. JobB is Node-oriented and acept parameter hostname. So in Nodes section you can specify "Dispatch to nodes"=true (radio button and in filter set something like name=${option.hostname}

For example I am using next Node filters: enter image description here

Max Markov
  • 924
  • 12
  • 23
  • If you create an option in the job, passing ${option.hostname} is easy, but it's not clear to me either how to return the node value from the selected items in a filter instead. It doesn't seem to be the same thing. – Ejoso Mar 22 '17 at 14:09
  • This is the best answer I've found so far: https://github.com/rundeck/rundeck/issues/612 – Ejoso Mar 22 '17 at 14:11