瀏覽代碼

Merge "Fix/Feature: RHEL repo.enabled=False; use pkgrepo.abset"

pull/139/head
Filip Pytloun 7 年之前
父節點
當前提交
904ca2ef73
共有 1 個檔案被更改,包括 24 行新增2 行删除
  1. +24
    -2
      linux/system/repo.sls

+ 24
- 2
linux/system/repo.sls 查看文件

@@ -108,7 +108,7 @@ linux_repo_{{ name }}:
{%- if repo.ppa is defined %}
- ppa: {{ repo.ppa }}
{%- else %}
- human_name: {{ name }}
- humanname: {{ name }}
- name: {{ repo.source }}
{%- if repo.architectures is defined %}
- architectures: {{ repo.architectures }}
@@ -143,6 +143,19 @@ linux_repo_{{ name }}:
{%- else %}

linux_repo_{{ name }}_absent:
pkgrepo.absent:
{%- if repo.ppa is defined %}
- ppa: {{ repo.ppa }}
{%- if repo.key_id is defined %}
- keyid_ppa: {{ repo.keyid_ppa }}
{%- endif %}
{%- else %}
- name: {{ repo.source }}
- file: /etc/apt/sources.list.d/{{ name }}.list
{%- if repo.key_id is defined %}
- keyid: {{ repo.key_id }}
{%- endif %}
{%- endif %}
file.absent:
- name: /etc/apt/sources.list.d/{{ name }}.list

@@ -150,17 +163,19 @@ linux_repo_{{ name }}_absent:

{%- endif %}

{#- os_family Debian #}
{%- endif %}

{%- if grains.os_family == "RedHat" %}

{%- if repo.get('enabled', True) %}

{%- if repo.get('proxy', {}).get('enabled', False) %}
# PLACEHOLDER
# TODO, implement per proxy configuration for Yum
{%- endif %}

{%- if not repo.get('default', False) %}

linux_repo_{{ name }}:
pkgrepo.managed:
- name: {{ name }}
@@ -176,11 +191,18 @@ linux_repo_{{ name }}:
{%- endif %}
- require:
- pkg: linux_repo_prereq_pkgs
{%- endif %}

{#- repo.enabled is false #}
{%- else %}
pkgrepo.absent:
- name: {{ repo.source }}
{%- endif %}

{#- os_family Redhat #}
{%- endif %}

{#- repo.iteritems() loop #}
{%- endfor %}

{%- if default_repos|length > 0 and grains.os_family == 'Debian' %}

Loading…
取消
儲存