Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node attributes are not substituted in adhoc commands #552

Open
leonboot opened this issue Jun 18, 2024 · 0 comments
Open

Node attributes are not substituted in adhoc commands #552

leonboot opened this issue Jun 18, 2024 · 0 comments

Comments

@leonboot
Copy link

I would expect to be able to use node and/or job attributes in ad hoc commands, just like in regular job scripts (like @node.name@, @job.project@, or @node.some_custom_attribute@) but it seems this is not supported, or I haven't found the proper notation.

I have tried the following command on a project that has two nodes, both having an attribute called stage:

 rd adhoc --follow --project=my-project --filter='stage: .*' -- echo @node.stage@

This results in the following output:

# Started execution 974785 running 2024-06-18T09:45:20+0200 - https://my-rundeck-server/project/my-project/execution/show/99999 adhoc echo @node.stage@
@node.stage@
@node.stage@

Wrapping the command in single or double quots made no difference, nor did omitting the --.

I noticed an --interpreter flag, but its description, Script interpreter string, doesn't make it clear to me what its purpose is and if this might be the key to getting the attribute substition to work.

Is attribute substition actually supported for ad hoc commands? And if so, could this be added to the documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant