Skip to content

Instantly share code, notes, and snippets.

@whytewolf

whytewolf/pillar Secret

Last active November 25, 2015 03:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whytewolf/d445bb08004e407d1ba5 to your computer and use it in GitHub Desktop.
Save whytewolf/d445bb08004e407d1ba5 to your computer and use it in GitHub Desktop.
{% for location in salt.pillar.get('salt2:locations') %}
salt_mirror:
file.managed:
- name: /srv/salt/mirror_{{ location }}.conf
- source: salt://saltstack/files/myfile.conf.j2
- template: jinja
- user: root
- group: root
- mode: 0600
- master: {{ salt.pillar.get('salt2:locations:'~ location,'ftp.debian.org') }}
{% endfor %}
salt2:
locations:
us: ftp.us.debian.org
uk: ftp.uk.debian.org
ua: ftp.ua.debian.org
salt_mirror:
file.managed:
- name: /srv/salt/mirror_ua.conf
- source: salt://saltstack/files/myfile.conf.j2
- template: jinja
- user: root
- group: root
- mode: 0600
- master: ftp.ua.debian.org
salt_mirror:
file.managed:
- name: /srv/salt/mirror_uk.conf
- source: salt://saltstack/files/myfile.conf.j2
- template: jinja
- user: root
- group: root
- mode: 0600
- master: ftp.uk.debian.org
salt_mirror:
file.managed:
- name: /srv/salt/mirror_us.conf
- source: salt://saltstack/files/myfile.conf.j2
- template: jinja
- user: root
- group: root
- mode: 0600
- master: ftp.us.debian.org
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment