joker
joker

Reputation: 13

set project wide variable in rundeck to use in jobs

is it possible to set sort of a project-variable in rundeck?

I am organizing jobs in projects, but the jobs are mostly the same and use the same values over and over again. If I could set variables per project, I could just copy jobs from project to project without having to adapt the same parameters over and over again...

like... path=/path/to/project and use the variable path in jobs

Thanks, regards Jochen

Upvotes: 1

Views: 868

Answers (1)

MegaDrive68k
MegaDrive68k

Reputation: 4325

You can define a global variable for that. You can define it on framework.properties file like framework.globals.myvar=myvalue or at project level (project.properties config) like project.globals.myvar=myvalue, to access it just use ${globals.myvar} for steps, @globals.myvar@ for inline-scripts or $RD_GLOBALS_MYVAR for scripts.

UPDATE:

In Rundeck 3.1/3.2/3.3/4.X the "project.properties" isn't a "file", is a config reachable/editable following this.

Upvotes: 1

Related Questions