Created
January 21, 2016 08:24
-
-
Save asjalik/7a057bada764e507772d to your computer and use it in GitHub Desktop.
random
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
#checking dir and appending text to the bottom of file | |
#/srv/salt/random/init.sls | |
{% if not salt['file.directory_exists' ]('/home/init_dir') %} | |
/tmp/random: | |
file.directory: | |
- user: root | |
- name: /tmp/random | |
- group: root | |
- mode: 755 | |
{% else %} | |
cmd.run: | |
- name: echo "Directory exists" | |
{% endif %} | |
/tmp/random/randomfile.txt: | |
file.append: | |
- text: | |
- "{{salt['pillar.get']('headers:salt:file')}}" | |
#pillars text | |
#/srv/pillar/headers/init.sls | |
headers: | |
salt: | |
file: | | |
# THIS FILE IS MANAGED BY SALTSTACK # |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment