Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% load_yaml as mirrors %}
- [
- { name: trusty, url: 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty main restricted universe multiverse' },
- { name: trusty-updates, url: 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-updates main restricted universe multiverse' },
- { name: trusty-backports, url: 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-backports main restricted universe multiverse' },
- { name: trusty-security, url: 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-security main restricted universe multiverse' }
- ]
- {% endload %}
- remove-mirror-file:
- file.absent:
- - name: /etc/apt/sources.list
- {% for mirror in mirrors %}
- update-mirror-{{ mirror.name }}:
- pkgrepo.managed:
- - name: {{ mirror.url }}
- {% if loop.first %}
- - refresh: True
- {% else %}
- - refresh: False
- {% endif %}
- {% endfor %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement