|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% set default_repos = {} %} |
|
|
{% set default_repos = {} %} |
|
|
|
|
|
|
|
|
|
|
|
{%- if system.purge_repos|default(False) %} |
|
|
|
|
|
|
|
|
|
|
|
purge_sources_list_d_repos: |
|
|
|
|
|
file.directory: |
|
|
|
|
|
- name: /etc/apt/sources.list.d/ |
|
|
|
|
|
- clean: True |
|
|
|
|
|
|
|
|
|
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
{%- for name, repo in system.repo.iteritems() %} |
|
|
{%- for name, repo in system.repo.iteritems() %} |
|
|
|
|
|
|
|
|
{%- if grains.os_family == 'Debian' %} |
|
|
{%- if grains.os_family == 'Debian' %} |
|
|
|
|
|
|
|
|
{%- if system.proxy.get('pkg', {}).get('enabled', False) %} |
|
|
{%- if system.proxy.get('pkg', {}).get('enabled', False) %} |
|
|
- file: /etc/apt/apt.conf.d/99proxies-salt |
|
|
- file: /etc/apt/apt.conf.d/99proxies-salt |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
|
|
|
{%- if system.purge_repos|default(False) %} |
|
|
|
|
|
- file: purge_sources_list_d_repos |
|
|
|
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- user: root |
|
|
- user: root |
|
|
- group: root |
|
|
- group: root |
|
|
- mode: 0644 |
|
|
- mode: 0644 |
|
|
|
|
|
{%- if system.purge_repos %} |
|
|
|
|
|
- replace: True |
|
|
|
|
|
{%- endif %} |
|
|
- defaults: |
|
|
- defaults: |
|
|
default_repos: {{ default_repos }} |
|
|
default_repos: {{ default_repos }} |
|
|
- require: |
|
|
- require: |