Przeglądaj źródła

purging repos

tags/2017.4.1
Jiri Broulik 7 lat temu
rodzic
commit
25839cca97
3 zmienionych plików z 17 dodań i 0 usunięć
  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 Wyświetl plik

@@ -28,6 +28,15 @@ include:

{% 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() %}

{%- if grains.os_family == 'Debian' %}
@@ -112,6 +121,9 @@ linux_repo_{{ name }}:
{%- if system.proxy.get('pkg', {}).get('enabled', False) %}
- file: /etc/apt/apt.conf.d/99proxies-salt
{%- endif %}
{%- if system.purge_repos|default(False) %}
- file: purge_sources_list_d_repos
{%- endif %}

{%- endif %}

@@ -158,6 +170,9 @@ default_repo_list:
- user: root
- group: root
- mode: 0644
{%- if system.purge_repos %}
- replace: True
{%- endif %}
- defaults:
default_repos: {{ default_repos }}
- require:

+ 1
- 0
metadata/service/system/init.yml Wyświetl plik

@@ -13,6 +13,7 @@ parameters:
home: /root
timezone: Europe/Prague
cluster: default
purge_repos: false
network:
enabled: true
hostname: ${linux:system:name}

+ 1
- 0
tests/pillar/system.sls Wyświetl plik

@@ -6,6 +6,7 @@ linux:
domain: local
environment: prd
hostname: system.pillar.local
purge_repos: true
apparmor:
enabled: false
haveged:

Ładowanie…
Anuluj
Zapisz