diff options
| author | ckonstanski <ckonstanski@pippiandcarlos.com> | 2017-10-24 19:24:39 -0600 |
|---|---|---|
| committer | ckonstanski <ckonstanski@pippiandcarlos.com> | 2017-10-24 19:24:39 -0600 |
| commit | b7f2fa2de43b5d24e119f9d2c68964aac5b8e097 (patch) | |
| tree | 9f5ef21b914b2c78e34377cd1a6a3fc53d12101c /salt | |
| parent | ad7ae36edbb6a0b3d3b3b14adde880537c3b1ee4 (diff) | |
ansible salt needs one file not in the buildroot
Diffstat (limited to 'salt')
| -rw-r--r-- | salt/openbook/ansible/init.sls | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/salt/openbook/ansible/init.sls b/salt/openbook/ansible/init.sls index b446c33..547544d 100644 --- a/salt/openbook/ansible/init.sls +++ b/salt/openbook/ansible/init.sls @@ -12,22 +12,14 @@ ansible_dirs_{{ dir[0] }}: - makedirs: True {% endfor %} -{% for symlink in pillar["ansible"]["symlinks"].items() %} -ansible_symlinks_{{ symlink[0] }}: - file.symlink: -{% if symlink[1]["relative_to_buildroot"] %} - - name: {{ pillar["ansible"]["build_dir"] }}/{{ symlink[1]["name"] }} - - target: {{ pillar["ansible"]["build_dir"] }}/{{ symlink[1]["target"] }} -{% else %} - - name: {{ symlink[1]["name"] }} - - target: {{ symlink[1]["target"] }} -{% endif %} -{% endfor %} - {% for file in pillar["ansible"]["files"].items() %} ansible_files_{{ file[0] }}: file.managed: +{% if file[1]["relative_to_buildroot"] %} - name: {{ pillar["ansible"]["build_dir"] }}/{{ file[1]["name"] }} +{% else %} + - name: {{ {{ file[1]["name"] }} +{% endif %} - source: salt://openbook/ansible/files/{{ file[1]["source"] }} {% if file[1]["is_template"] %} - template: jinja @@ -36,3 +28,15 @@ ansible_files_{{ file[0] }}: - group: root - mode: {{ file[1]["mode"] }} {% endfor %} + +{% for symlink in pillar["ansible"]["symlinks"].items() %} +ansible_symlinks_{{ symlink[0] }}: + file.symlink: +{% if symlink[1]["relative_to_buildroot"] %} + - name: {{ pillar["ansible"]["build_dir"] }}/{{ symlink[1]["name"] }} + - target: {{ pillar["ansible"]["build_dir"] }}/{{ symlink[1]["target"] }} +{% else %} + - name: {{ symlink[1]["name"] }} + - target: {{ symlink[1]["target"] }} +{% endif %} +{% endfor %} |
