Skip to content

Instantly share code, notes, and snippets.

@gravyboat
Created February 11, 2014 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gravyboat/8945670 to your computer and use it in GitHub Desktop.
Save gravyboat/8945670 to your computer and use it in GitHub Desktop.
referencing pillar
echo foo > /tmp/foo:
cmd.run:
- onlyif: test -e {{ pillar['some_file'] }}
@gravyboat
Copy link
Author

echo foo > /tmp/foo:
  cmd.run:
    - onlyif: test -e {{ salt['pillar.get']('my:thing') }}

@gravyboat
Copy link
Author

{% set test = salt['pillar.get']('my:thing') %}

echo foo > /tmp/foo:
  cmd.run:
    - onlyif: test -e {{ test }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment