Last active
July 3, 2017 13:05
-
-
Save nlm/781f524afa2ede04682d2b774287faa4 to your computer and use it in GitHub Desktop.
Saltstack pattern to trigger commands when a pillar changes without storing it on the host in clear-text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
intermediate-state-file: | |
file.managed: | |
- name: /etc/.intermediate_state_file | |
- contents: {{ salt['hashutil.sha256_digest'](salt['pillar.get']('my_pillar')|string) }} | |
my-cmd-1: | |
cmd.wait: | |
- name: "echo a command you want to run only when a my_pillar changes, but without storing it raw on the host" | |
- watch: | |
- file: intermediate-state-file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment