-
-
Save Slimmons/b52d768f52033c86890666759d4836e0 to your computer and use it in GitHub Desktop.
This file contains 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
#This file is located at /srv/reactor/testdirectory/configure.sls | |
{% set postdata = data.get('post', {}) %} | |
{% if grains['os_family']=="Debian" %} | |
testifthisworks: | |
local.state.apply: | |
- tgt: {{ postdata.tgt }} | |
- arg: | |
- transferfile.init | |
{% endif %} |
This file contains 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
#This file is located at /srv/salt/transferfile/init.sls | |
/root/testfile.txt: | |
file.managed: | |
- source: salt://testfiles/testfile.txt | |
- makedirs: True | |
- mode: 700 | |
- template: jinja |
This file contains 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
#This file is located at /etc/salt/master.d/reactor.conf | |
reactor: | |
- 'salt/netapi/hook/test': | |
- /srv/reactor/testdirectory/configure.sls |
whytewolf
commented
Jul 18, 2016
So, as it stands right now I get the postdata in the configure.sls file, but I'd like to be able to pass in more postdata, and use it in the init.sls, or other places. Is there a way to pull all of the postdata (data.get) and put it in the pillar or grains? Or possibly pass it into init.sls?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment