3

No matter what I try, executing pwd always prints /var/log/rundeck. I'd like to configure this as a global or even project-wide setting as all my scripts and commands will be relative to a specific directory on the file system.

/home/jobs for example.

Matt Wielbut
  • 2,584
  • 25
  • 29

3 Answers3

2

There is no setting on Rundeck can set working directory.

Each command is running in separate context, you can chain them together.

enter image description here

Yang
  • 858
  • 6
  • 22
1

As an improvement to the above answer by "Yang" you can edit rundeck "resources.xml" file and add a attribute called "nodepwd" with your node location like below.

<node name="localhost" nodepwd="/your/pwd/location" ....  />

Then you can change your path to that and execute the commands.

enter image description here

0

In my case, I have to run "cd $RD_NODE_NODEPWD" in my inline scripts to change the current working directory.

Jerry Li
  • 41
  • 4