token expansion in nodes filter
Reported by Vincent Behar | 2011-03-18 07:17:59 UTC | in Rundeck 1.3 (closed)
Hi,
it would be nice to have some token expansion (like {job.name}) in nodes filter, so that we can use the name of job as a node name filter.
Vincent
Comments and changes to this ticket
-

Alex-SF 2011-03-21 08:08:19 UTC
- Milestone cleared.
- Milestone order changed from 17 to 0
-

Alexei Bratuhin 2011-05-23 11:47:16 UTC
Hello Vincent, i've implemented this feature for tags and names - it currently suffies my needs. Please try it out and give feedback, if possible.
Regards. -

Alexei Bratuhin 2011-05-23 11:47:56 UTC
Forgot to mention - there is a pull-request pending:
https://github.com/dtolabs/rundeck/pull/36 -

-

Greg Schueler 2011-06-01 08:47:56 UTC
- Milestone set to Rundeck 1.3
- Milestone order changed from 39 to 0
-

Alex-SF 2011-06-08 08:35:05 UTC
- Assigned user set to Greg Schueler
-

Alex-SF 2011-06-08 11:22:38 UTC
- Tag set to feature request, tokens
-

Deleted User 2011-06-21 19:49:26 UTC
- State changed from new to needs_verification
(from [c1137d39a3c8c6a895d28a7d06dc1d63086a42d1]) Add support for variable expansion in job node filters. (pull req #39) [#235 state:needs_verification] https://github.com/dtolabs/rundeck/commit/c1137d39a3c8c6a895d28a7d0...
-

Moses Lei 2011-07-08 14:32:55 UTC
- Tag changed from feature request, tokens to feature request, documentation, tokens
The fact that this is allowed now needs to be added to documentation
-

Moses Lei 2011-07-08 15:17:30 UTC
- State changed from needs_verification to open
I tested this with this job:
- id: filter-variable-expansion-test1 project: test loglevel: INFO sequence: keepgoing: false strategy: node-first commands: - exec: uname -a description: '' name: testjob1 uuid: filter-variable-expansion-test1 nodefilters: dispatch: threadcount: 1 keepgoing: false excludePrecedence: true include: name: ${option.hosts} options: hosts: {}It sort of works. I get this message when I get to the execution screen:
Warning: The Node filters specified for this Job do not match any nodes, execution will fail.I enter the hostname in the option box and click Run Job Now.
- If I use the ajax version of the green Play button from the
jobs list (opens in same page), then clicking Run Job Now does
absolutely nothing (the dialog closes and I get back to the normal
jobs page)
- If I middle click (open in new tab) the green Play button and run it from there, I still get the warning message but the job works.
-

Greg Schueler 2011-07-13 11:18:05 UTC
- Milestone order changed from 1 to 0
i believe your problem 1: was just that the page might not update to reflect the executing job if it finishes quickly.
Adding documentation.
-

Deleted User 2011-07-13 11:18:41 UTC
- State changed from open to needs_verification
(from [b2db43936473052bf2f69b8ebc727b28ef132826]) Add documentation about dynamic node filters via token expansion. [#235 state:needs_verification] https://github.com/dtolabs/rundeck/commit/b2db43936473052bf2f69b8eb...
-

Moses Lei 2011-07-13 11:21:16 UTC
We may want to disable the warning if there are variables in the filters...
-

Greg Schueler 2011-07-14 19:51:37 UTC
should it display some other text in this case? like "Note: The Node filters specified for this Job contain variable references, and the runtime nodeset cannot be determined."
-

-

Greg Schueler 2011-07-15 09:20:46 UTC
(from [3f0ab992529554e993a35c947c93c2c620dc460b]) Add note about filter variables in execute page [#235 state:needs_verification] https://github.com/dtolabs/rundeck/commit/3f0ab992529554e993a35c947...
-

Alex-SF 2011-07-15 11:48:29 UTC
- State changed from needs_verification to resolved
Verified in http://build.rundeck.org/job/release-1.3-rc/99/
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
(DEPRECATED) Please use github issues for issue tracking at http://github.com/dtolabs/rundeck/issues
People watching this ticket
Referenced by
-
235
token expansion in nodes filter
(from [c1137d39a3c8c6a895d28a7d06dc1d63086a42d1])
Add sup...