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

Add context variables support for job steps definition #64

Closed
GrinGrin opened this issue Sep 24, 2016 · 4 comments
Closed

Add context variables support for job steps definition #64

GrinGrin opened this issue Sep 24, 2016 · 4 comments

Comments

@GrinGrin
Copy link

Hi,

It would be really useful to be able to use context variables in the job steps definitions like ${job.project}, ${job.name} and so on.
Not all context variables are needed as most of them are defined by Ansible facts, but at least the job.*

I'm trying to configure a generic job that can run a playbook stored in the project folder (under /var/rundeck/projects/<project_name>/playbooks) I can duplicate to add now playbooks when needed and such variables would be really useful !

@yassineazzouz
Copy link
Contributor

IHi @GrinGrin ,

I assume, you mean accessing the context variables inside your ansible script ? I agree but that will be a bit tricky to add since the variables need to be added to passes to ansible itself.

@GrinGrin
Copy link
Author

Hi @yassineazzouz ,

I mean using context variables like ${job.project} to compose a dynamic path to the playbook. Currently Rundeck say the path is not valid if I set something like /var/rundeck/project/${job.project}/playbooks/something.yml even if the path, when manually expanded with the project name, exists on the Rundeck server.

You can see in the screenshot below that I already use this variable in the previous step to create a script going to the desired path and make a git pull before using the playbooks

2016-09-29_18h17_21

@yassineazzouz
Copy link
Contributor

Hi @GrinGrin ,

Ok, I see what you mean, I'm actually working on an almost full rewrite of the plugin code, that I will be available soon hopefully, and will include that.

Thanks,

@yassineazzouz
Copy link
Contributor

Hi @GrinGrin ,

This should be fixed in release 2.0.0

Thanks,

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

2 participants