Created
August 28, 2017 10:10
-
-
Save anonymous/5437e75a26702eabf9ea59eb11158cdb 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
### pillar file: | |
tibco: | |
ems: data from pillar file | |
mdm: | |
a: from pillar | |
### data file.yaml -> will be stored in the variable ed | |
tibco: | |
ems: from yaml | |
mdm: | |
a: data from yaml | |
### STATE FILE | |
{% import_yaml 'data.yaml' as ed %} # external data | |
{%- set np = salt['pillar.get']('tibco', ed.tibco, merge=true) %} # new pillar | |
file_edit: | |
file.blockreplace: | |
- name: /root/.bashrc | |
- append_if_not_found: True | |
- marker_start: "### SALTSTACK BLOCK START ###" | |
- marker_end: "### SALTSTACK BLOCK END ###" | |
- content: | | |
# {{ np.ems }} -> this gets the data from pillar not from data.yaml | |
# {{ np.mdm.a }} -> this gets the data from pillar not from data.yaml | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment