Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

token expansion in nodes filter

#235

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

Reported by Vincent Behar · March 18th, 2011 @ 07:17 AM

State: needs_verification
Milestone: Rundeck 1.3
Assigned to: Greg Schueler Greg Schueler

Activity

  1. Alex-SF
    Alex-SF
    • Milestone cleared.
    • Milestone order changed from 17 to 0

    March 21st, 2011 @ 08:08 AM

  2. Alexei Bratuhin
    Alexei Bratuhin

    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.

    May 23rd, 2011 @ 11:47 AM

  3. Alexei Bratuhin
    Alexei Bratuhin

    Forgot to mention - there is a pull-request pending:
    https://github.com/dtolabs/rundeck/pull/36

    May 23rd, 2011 @ 11:47 AM

  4. Vincent Behar
  5. Greg Schueler
    Greg Schueler
    • Milestone set to Rundeck 1.3
    • Milestone order changed from 39 to 0

    June 1st, 2011 @ 08:47 AM

  6. Alex-SF
    Alex-SF
    • Assigned user set to Greg Schueler

    June 8th, 2011 @ 08:35 AM

  7. Alex-SF
    Alex-SF
    • Tag set to feature request, tokens

    June 8th, 2011 @ 11:22 AM

  8. Deleted User
    Deleted User
    • 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...

    June 21st, 2011 @ 07:49 PM

  9. Moses Lei
    Moses Lei
    • Tag changed from feature request, tokens to feature request, documentation, tokens

    The fact that this is allowed now needs to be added to documentation

    July 8th, 2011 @ 02:32 PM

  10. Moses Lei
    Moses Lei
    • 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.
    1. 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)
    2. 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.

    July 8th, 2011 @ 03:17 PM

  11. Greg Schueler
    Greg Schueler
    • 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.

    July 13th, 2011 @ 11:18 AM

  12. Deleted User
    Deleted User
    • 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...

    July 13th, 2011 @ 11:18 AM

  13. Moses Lei
    Moses Lei

    We may want to disable the warning if there are variables in the filters...

    July 13th, 2011 @ 11:21 AM

  14. Greg Schueler
    Greg Schueler

    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."

    July 14th, 2011 @ 07:51 PM

  15. Alex-SF
  16. Greg Schueler
  17. Alex-SF
    Alex-SF
    • State changed from needs_verification to resolved

    July 15th, 2011 @ 11:48 AM

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.