Search code examples
rundeck

what is the correct way of setting a global variable in rundeck


I have a Windows server running the community version of Rundeck and I am trying to set a global variable to use in my PowerShell scripts. So I edited the "framework.properties" file and set my variable.

enter image description here

I then created a test job (script) and tried to expand the variable, using all three methods shown in rundeck.

enter image description here

When I run the job I don't get any output though

enter image description here

So what is the correct way to set a global variable in rundeck?


Solution

  • Restart the Rundeck service after editing the framwork.properties file.

    This is mandatory if you want to use "framework globals". Alternatively, you can use globals in the project config file (without restarting Rundeck).

    For that, go to project settings > edit configuration > edit configuration file and then add the global.

    Check the result after restarting Rundeck.