瀏覽代碼

Merge pull request #83 from salt-formulas/pr/preinstall-apt-https-tranpsort2

avoid install system pkgs before repo configured
tags/2017.4.1
Aleš Komárek 7 年之前
父節點
當前提交
6e6577a609
共有 3 個檔案被更改,包括 8 行新增11 行删除
  1. +2
    -2
      linux/map.jinja
  2. +0
    -4
      linux/system/package.sls
  3. +6
    -5
      linux/system/repo.sls

+ 2
- 2
linux/map.jinja 查看文件

@@ -21,7 +21,7 @@
'doc_validity_pkgs': ['python-yaml'],
},
'Debian': {
'pkgs': ['python-apt','vim-nox', 'apt-transport-https', 'libmnl0'],
'pkgs': ['python-apt', 'apt-transport-https', 'libmnl0'],
'utc': true,
'user': {},
'group': {},
@@ -42,7 +42,7 @@
'doc_validity_pkgs': ['python-yaml'],
},
'RedHat': {
'pkgs': ['policycoreutils', 'policycoreutils-python', 'vim-enhanced', 'telnet', 'wget'],
'pkgs': ['policycoreutils', 'policycoreutils-python', 'telnet', 'wget'],
'utc': true,
'user': {},
'group': {},

+ 0
- 4
linux/system/package.sls 查看文件

@@ -1,10 +1,6 @@
{%- from "linux/map.jinja" import system with context %}
{%- if system.enabled %}

linux_packages:
pkg.installed:
- pkgs: {{ system.pkgs }}

{%- set pkgs_groups = {
'latest': [],
'purged': [],

+ 6
- 5
linux/system/repo.sls 查看文件

@@ -1,8 +1,9 @@
{%- from "linux/map.jinja" import system with context %}
{%- if system.enabled %}

include:
- linux.system.package
linux_repo_prereq_pkgs:
pkg.installed:
- pkgs: {{ system.pkgs }}

# global proxy setup
{%- if system.proxy.get('pkg', {}).get('enabled', False) %}
@@ -114,7 +115,7 @@ linux_repo_{{ name }}:
- clean_file: {{ repo.get('clean_file', False) }}
- refresh_db: {{ repo.get('refresh_db', True) }}
- require:
- pkg: linux_packages
- pkg: linux_repo_prereq_pkgs
{%- if repo.get('proxy', {}).get('enabled', False) %}
- file: /etc/apt/apt.conf.d/99proxies-salt-{{ name }}
{%- endif %}
@@ -152,7 +153,7 @@ linux_repo_{{ name }}:
- gpgkey: {{ repo.gpgkey }}
{%- endif %}
- require:
- pkg: linux_packages
- pkg: linux_repo_prereq_pkgs

{%- endif %}

@@ -176,7 +177,7 @@ default_repo_list:
- defaults:
default_repos: {{ default_repos }}
- require:
- pkg: linux_packages
- pkg: linux_repo_prereq_pkgs

{%- endif %}


Loading…
取消
儲存