cmd.script not using env list from sls
Perhaps I am doing something wrong... but cannot figure out what it is. I am using the example given in the docs
scripts/foo.sh
echo "BATCH is: $BATCH"test.sls
salt://scripts/foo.sh: cmd.script: - env: - BATCH: 'yes'
$ sudo salt-call state.sls test
local:
----------
State: - cmd
Name: salt://scripts/foo.sh
Function: script
Result: True
Comment: Command "salt://scripts/foo.sh" run
Changes: pid: 11899
retcode: 0
stderr:
stdout: BATCH is:
Summary
------------
Succeeded: 1
Failed: 0
------------
Total: 1
edit:
$ salt-call --version
salt-call 0.17.5
That version is a little old.... actually too old... Can't upgrade to a more recent one?
That's what I thought. But the version is what is provided using ubuntu's universe repo for Trusty.
Would using Salt's PPA be an option?
Sorry should have updated this.
I ended up just installing the salt-minion via cloud-init to whatever version it can find, then I use salt to install the PPA and upgrade it as the first step. Solves my problem.
Also, might want to add to documentation a minimum version for this to work perhaps.