Advertisement
Guest User

Untitled

a guest
Feb 16th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. {% load_yaml as mirrors %}
  2. [
  3. { name: trusty, url: 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty main restricted universe multiverse' },
  4. { name: trusty-updates, url: 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-updates main restricted universe multiverse' },
  5. { name: trusty-backports, url: 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-backports main restricted universe multiverse' },
  6. { name: trusty-security, url: 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-security main restricted universe multiverse' }
  7. ]
  8. {% endload %}
  9.  
  10. remove-mirror-file:
  11. file.absent:
  12. - name: /etc/apt/sources.list
  13.  
  14. {% for mirror in mirrors %}
  15. update-mirror-{{ mirror.name }}:
  16. pkgrepo.managed:
  17. - name: {{ mirror.url }}
  18. {% if loop.first %}
  19. - refresh: True
  20. {% else %}
  21. - refresh: False
  22. {% endif %}
  23. {% endfor %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement