2

I am running a script using rundeck that depends on access to system-wide environmental variables on the node I'm executing the script on. These variables have been set in /etc/environment.

First, how do I get rundeck to ingest the system environment? I can't find any option in rundeck to do this.

Second, why doesn't this happen by default? I'm under the impression that rundeck works through ssh; shouldn't the system environment be loaded every time it logs in to the node?

apteryx
  • 123
  • 1
  • 3

1 Answers1

1

Environment variables are a shell feature. If your execution does not involve shells, then there won't be any environment variables either.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63
  • I thought because of the name that ssh _is_ a shell. Or am I confusing terminology? – apteryx Aug 10 '16 at 15:52
  • The name is confusing I have to admit. SSH is only a method to securely transport a TTY interface over the internet, and shells run on top of the TTY interface. – Tero Kilkanen Aug 11 '16 at 01:34
  • So you're saying rundeck's shell is not running in the node's environment, it's just sending commands to it? – apteryx Aug 11 '16 at 16:38
  • I am not familiar with Rundeck and how it does things, does it use shell scripts (bash / dash / zsh / ksh), or does it execute binaries directly. – Tero Kilkanen Aug 11 '16 at 18:39