Skip to content

Instantly share code, notes, and snippets.

@ssplatt
Last active November 25, 2015 02:26
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 ssplatt/a9b02519d5cc29ae67d2 to your computer and use it in GitHub Desktop.
Save ssplatt/a9b02519d5cc29ae67d2 to your computer and use it in GitHub Desktop.
salt:
mirrors:
- ftp.us.debian.org
- ftp.uk.debian.org
- ftp.ua.debian.org
locations:
- us
- uk
- ua
{%- 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