Browse Source

purging repos

tags/2017.4.1
Jiri Broulik 7 years ago
parent
commit
25839cca97
3 changed files with 17 additions and 0 deletions
  1. +15
    -0
      linux/system/repo.sls
  2. +1
    -0
      metadata/service/system/init.yml
  3. +1
    -0
      tests/pillar/system.sls

+ 15
- 0
linux/system/repo.sls View File



{% 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:

+ 1
- 0
metadata/service/system/init.yml View File

home: /root home: /root
timezone: Europe/Prague timezone: Europe/Prague
cluster: default cluster: default
purge_repos: false
network: network:
enabled: true enabled: true
hostname: ${linux:system:name} hostname: ${linux:system:name}

+ 1
- 0
tests/pillar/system.sls View File

domain: local domain: local
environment: prd environment: prd
hostname: system.pillar.local hostname: system.pillar.local
purge_repos: true
apparmor: apparmor:
enabled: false enabled: false
haveged: haveged:

Loading…
Cancel
Save