Browse Source

avoid install system pkgs before repo configured

tags/2017.4.1
Petr Michalec 7 years ago
parent
commit
459da2bc65
No account linked to committer's email address
3 changed files with 8 additions and 11 deletions
  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 View File

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

+ 0
- 4
linux/system/package.sls View File

{%- from "linux/map.jinja" import system with context %} {%- from "linux/map.jinja" import system with context %}
{%- if system.enabled %} {%- if system.enabled %}


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

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

+ 6
- 5
linux/system/repo.sls View File

{%- from "linux/map.jinja" import system with context %} {%- from "linux/map.jinja" import system with context %}
{%- if system.enabled %} {%- if system.enabled %}


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


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


{%- endif %} {%- endif %}


- defaults: - defaults:
default_repos: {{ default_repos }} default_repos: {{ default_repos }}
- require: - require:
- pkg: linux_packages
- pkg: linux_repo_prereq_pkgs


{%- endif %} {%- endif %}



Loading…
Cancel
Save