gschueler / imok

Are you ok?
2 stars 0 forks source link

Custom Fields can't be used in a filter #5

Closed gschueler closed 12 years ago

gschueler commented 12 years ago

Since 1.3 you are able to generate custom fields on the fly based on the input from your resource provider. These fields are shown in the UI but are not usable to create a filter. According to Alex-SF (via IRC) this is an oversight and should be implemented.

original LH ticket

gschueler commented 12 years ago

Some custom fields might also be a list (like tags). Perhaps Rundeck can interpret them if they are unquoted lists. Eg in yaml form,

Allowing a custom field to be interpreted as a list will facilitate tags-like filtering. Eg

gschueler commented 12 years ago

Is this partially implemented? Seems to work on command line "dispatch -p myproj -I environment=prod" but not form rundeck web.

by stagr.lee

gschueler commented 12 years ago

The GUI simply doesn't support filtering by custom attributes yet. This is supported in the underlying filter code, and the CLI tools. it needs to be added to the GUI

by Greg Schueler

gschueler commented 12 years ago

What about in the XML job description too? I really want to be able to specify a dynamic node filter using the custom attributes. That way I can define something like environment="production" in my node definition, and use a job option to specify the environment dynamically.

This will give me the possibility of making the option required. That way I don't dispatch commands to ALL environment by accident if the "environment" option wasn't specified.

Here's an example of what I'm talking about:

...

web ${option}

...

by Etienne Pelletier

gschueler commented 12 years ago

That should have been ${option.env} btw.

by Etienne Pelletier

gschueler commented 12 years ago

Yes, needs to be supported in the xml/yaml serialization formats as well too

by Greg Schueler

gschueler commented 12 years ago

Am also interested in this! I am trying to get some puppet facts (facter -p) into rundeck. I am using puppet-rundeck, to include those facts

But rundeck isn't picking those fields up in the include/exclude filters

by Phil Spencer