Skip to content

Instantly share code, notes, and snippets.

@SEJeff
Created March 15, 2012 16:22
Show Gist options
  • Save SEJeff/2045075 to your computer and use it in GitHub Desktop.
Save SEJeff/2045075 to your computer and use it in GitHub Desktop.
include:
- apt
# our custom sources
/etc/apt/sources.list.d/fatbox.list:
file:
- managed
- source: salt://fatbox/debian/apt/fatbox.list
- owner: root
- group: root
- mode: 644
- template: jinja
extend:
apt-update:
cmd:
- watch:
- file: /etc/apt/sources.list.d/fatbox.list
# and the key to go with it
{% for key in 'fatbox','debian-david' %}
/etc/apt/{{ key }}.key:
file:
- managed
- source: salt://fatbox/debian/apt/{{ key }}.key
- owner: root
- group: root
- mode: 644
apt-add-{{ key }}-key:
cmd:
- wait
- name: apt-key add /etc/apt/{{ key }}.key
- watch:
- file: /etc/apt/{{ key }}.key
extend:
apt-update:
cmd:
- watch:
- cmd: apt-add-{{ key }}-key
{% endfor %}
# vim: set ft=yaml ts=2 sw=2 et sts=2 :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment