Last active
November 25, 2015 02:26
-
-
Save ssplatt/a9b02519d5cc29ae67d2 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
salt: | |
mirrors: | |
- ftp.us.debian.org | |
- ftp.uk.debian.org | |
- ftp.ua.debian.org | |
locations: | |
- us | |
- uk | |
- ua |
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
{%- from "salt/map.jinja" import salt with context %} | |
{% for location in salt.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 | |
{%- for mirror in saltstack.mirrors %} | |
{%- if location in mirror %} | |
- master: {{ mirror }} | |
{%- else %} | |
- master: ftp.debian.org | |
{%- endif %} | |
{%- endfor %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment