refactor(mapping): simplify py version handling
This commit is contained in:
parent
72e2f3640f
commit
715e3b8fa4
|
@ -3,6 +3,7 @@
|
||||||
---
|
---
|
||||||
salt:
|
salt:
|
||||||
version: ''
|
version: ''
|
||||||
|
py_ver: '' ## py2 is default
|
||||||
rootuser: root
|
rootuser: root
|
||||||
rootgroup: root
|
rootgroup: root
|
||||||
install_packages: true
|
install_packages: true
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
# vim: ft=yaml
|
# vim: ft=yaml
|
||||||
---
|
---
|
||||||
|
|
||||||
{%- import_yaml "salt/ospyvermap.yaml" as ospyvermap %}
|
{%- set py_ver_repr = salt['pillar.get']('salt:py_ver', '') %}
|
||||||
{%- set ospyver = salt['grains.filter_by'](ospyvermap, grain='os_family') or {} %}
|
|
||||||
{%- set py_ver_repr = salt['pillar.filter_by'](ospyver, pillar='salt:py_ver', default='py2') %}
|
|
||||||
|
|
||||||
{%- set osrelease = salt['grains.get']('osrelease') %}
|
{%- set osrelease = salt['grains.get']('osrelease') %}
|
||||||
{#- Workaround for OpenSuse Leap 15.1 until the repo is available #}
|
{#- Workaround for OpenSuse Leap 15.1 until the repo is available #}
|
||||||
|
@ -26,8 +24,8 @@
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
Debian:
|
Debian:
|
||||||
pkgrepo: 'deb http://repo.saltstack.com/{{ py_ver_repr }}/{{ osfamily_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }} {{ oscodename }} main'
|
pkgrepo: 'deb http://repo.saltstack.com/{{ py_ver_repr or 'apt' }}/{{ osfamily_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }} {{ oscodename }} main'
|
||||||
key_url: 'https://repo.saltstack.com/{{ py_ver_repr }}/{{ osfamily_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
|
key_url: 'https://repo.saltstack.com/{{ py_ver_repr or 'apt' }}/{{ osfamily_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
|
||||||
libgit2: libgit2-22
|
libgit2: libgit2-22
|
||||||
pyinotify: python-pyinotify
|
pyinotify: python-pyinotify
|
||||||
gitfs:
|
gitfs:
|
||||||
|
@ -43,8 +41,8 @@ Debian:
|
||||||
RedHat:
|
RedHat:
|
||||||
pkgrepo_name: saltstack
|
pkgrepo_name: saltstack
|
||||||
pkgrepo_humanname: SaltStack repo for RHEL/CentOS $releasever
|
pkgrepo_humanname: SaltStack repo for RHEL/CentOS $releasever
|
||||||
pkgrepo: 'https://repo.saltstack.com/{{ py_ver_repr }}/redhat/$releasever/$basearch/{{ salt_release }}'
|
pkgrepo: 'https://repo.saltstack.com/{{ py_ver_repr or 'yum' }}/redhat/$releasever/$basearch/{{ salt_release }}'
|
||||||
key_url: 'https://repo.saltstack.com/{{ py_ver_repr }}/redhat/$releasever/$basearch/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
|
key_url: 'https://repo.saltstack.com/{{ py_ver_repr or 'yum' }}/redhat/$releasever/$basearch/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
|
||||||
pygit2: python-pygit2
|
pygit2: python-pygit2
|
||||||
python_git: GitPython
|
python_git: GitPython
|
||||||
gitfs:
|
gitfs:
|
||||||
|
@ -105,14 +103,14 @@ Alpine:
|
||||||
|
|
||||||
FreeBSD:
|
FreeBSD:
|
||||||
rootgroup: wheel
|
rootgroup: wheel
|
||||||
salt_master: py27-salt
|
salt_master: {{ py_ver_repr or 'py27' }}-salt
|
||||||
salt_minion: py27-salt
|
salt_minion: {{ py_ver_repr or 'py27' }}-salt
|
||||||
salt_syndic: py27-salt
|
salt_syndic: {{ py_ver_repr or 'py27' }}-salt
|
||||||
salt_cloud: py27-salt
|
salt_cloud: {{ py_ver_repr or 'py27' }}-salt
|
||||||
salt_api: py27-salt
|
salt_api: {{ py_ver_repr or 'py27' }}-salt
|
||||||
salt_ssh: py27-salt
|
salt_ssh: {{ py_ver_repr or 'py27' }}-salt
|
||||||
python_git: py27-GitPython
|
python_git: {{ py_ver_repr or 'py27' }}-GitPython
|
||||||
pygit2: py27-pygit2
|
pygit2: {{ py_ver_repr or 'py27' }}-pygit2
|
||||||
config_path: /usr/local/etc/salt
|
config_path: /usr/local/etc/salt
|
||||||
minion_service: salt_minion
|
minion_service: salt_minion
|
||||||
master_service: salt_master
|
master_service: salt_master
|
||||||
|
@ -132,7 +130,7 @@ OpenBSD:
|
||||||
python_git: py-GitPython
|
python_git: py-GitPython
|
||||||
|
|
||||||
Windows:
|
Windows:
|
||||||
salt_minion: salt-minion{{ py_ver_repr }}
|
salt_minion: salt-minion{{ py_ver_repr or '-py3' }}
|
||||||
config_path: 'C:\salt\conf'
|
config_path: 'C:\salt\conf'
|
||||||
minion_service: salt-minion
|
minion_service: salt-minion
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
# vim: ft=yaml
|
# vim: ft=yaml
|
||||||
---
|
---
|
||||||
|
|
||||||
{% import_yaml "salt/ospyvermap.yaml" as ospyvermap %}
|
{%- set py_ver_dir = salt['pillar.get']('salt:py_ver', '') %}
|
||||||
{% set ospyver = salt['grains.filter_by'](ospyvermap, grain='os_family') or {} %}
|
|
||||||
{% set py_ver_dir = salt['pillar.filter_by'](ospyver, pillar='salt:py_ver', default='py2') %}
|
|
||||||
|
|
||||||
{% set osrelease = salt['grains.get']('osrelease') %}
|
{% set osrelease = salt['grains.get']('osrelease') %}
|
||||||
{% set salt_release = salt['pillar.get']('salt:release', 'latest') %}
|
{% set salt_release = salt['pillar.get']('salt:release', 'latest') %}
|
||||||
|
@ -22,12 +20,12 @@ Fedora:
|
||||||
Amazon:
|
Amazon:
|
||||||
pkgrepo_name: saltstack-amzn-repo
|
pkgrepo_name: saltstack-amzn-repo
|
||||||
pkgrepo_humanname: SaltStack repo for Amazon Linux 2
|
pkgrepo_humanname: SaltStack repo for Amazon Linux 2
|
||||||
pkgrepo: 'https://repo.saltstack.com/yum/amazon/2/$basearch/{{ salt_release }}'
|
pkgrepo: 'https://repo.saltstack.com/{{ py_ver_dir or 'yum' }}/amazon/2/$basearch/{{ salt_release }}'
|
||||||
key_url: 'https://repo.saltstack.com/yum/amazon/2/$basearch/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
|
key_url: 'https://repo.saltstack.com/{{ py_ver_dir or 'yum' }}/amazon/2/$basearch/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
|
||||||
|
|
||||||
Ubuntu:
|
Ubuntu:
|
||||||
pkgrepo: 'deb http://repo.saltstack.com/{{ py_ver_dir }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }} {{ oscodename }} main'
|
pkgrepo: 'deb http://repo.saltstack.com/{{ py_ver_dir or 'apt' }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }} {{ oscodename }} main'
|
||||||
key_url: 'https://repo.saltstack.com/{{ py_ver_dir }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
|
key_url: 'https://repo.saltstack.com/{{ py_ver_dir or 'apt' }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
|
||||||
pygit2: python-pygit2
|
pygit2: python-pygit2
|
||||||
gitfs:
|
gitfs:
|
||||||
pygit2:
|
pygit2:
|
||||||
|
@ -37,8 +35,8 @@ Ubuntu:
|
||||||
install_from_package: Null
|
install_from_package: Null
|
||||||
|
|
||||||
Raspbian:
|
Raspbian:
|
||||||
pkgrepo: 'deb http://repo.saltstack.com/{{ py_ver_dir }}/{{ os_family_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }} {{ oscodename }} main'
|
pkgrepo: 'deb http://repo.saltstack.com/{{ py_ver_dir or 'apt' }}/{{ os_family_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }} {{ oscodename }} main'
|
||||||
key_url: 'https://repo.saltstack.com/{{ py_ver_dir }}/{{ os_family_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
|
key_url: 'https://repo.saltstack.com/{{ py_ver_dir or 'apt' }}/{{ os_family_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
|
||||||
|
|
||||||
SmartOS:
|
SmartOS:
|
||||||
salt_master: salt
|
salt_master: salt
|
||||||
|
@ -50,7 +48,7 @@ SmartOS:
|
||||||
minion_service: 'salt:minion'
|
minion_service: 'salt:minion'
|
||||||
master_service: 'salt:master'
|
master_service: 'salt:master'
|
||||||
api_service: 'salt:api'
|
api_service: 'salt:api'
|
||||||
python_dulwich: 'py27-dulwich'
|
python_dulwich: {{ py_ver_dir or 'py27' }}{{ '-dulwich' }}
|
||||||
gitfs:
|
gitfs:
|
||||||
dulwich:
|
dulwich:
|
||||||
install_from_source: false
|
install_from_source: false
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# vim: ft=yaml
|
|
||||||
---
|
|
||||||
Debian:
|
|
||||||
py2: 'apt'
|
|
||||||
py3: 'py3'
|
|
||||||
|
|
||||||
RedHat:
|
|
||||||
py2: 'yum'
|
|
||||||
py3: 'py3'
|
|
||||||
|
|
||||||
Suse: {}
|
|
||||||
|
|
||||||
Gentoo: {}
|
|
||||||
|
|
||||||
Arch: {}
|
|
||||||
|
|
||||||
Alpine: {}
|
|
||||||
|
|
||||||
FreeBSD: {}
|
|
||||||
|
|
||||||
OpenBSD: {}
|
|
||||||
|
|
||||||
# This is *not* used directly with https://repo.saltstack.com
|
|
||||||
# Rather, this is used with `salt-winrepo-ng`, where the package names are:
|
|
||||||
# * py2: salt-minion
|
|
||||||
# * py3: salt-minion-py3
|
|
||||||
Windows:
|
|
||||||
py2: ''
|
|
||||||
py3: '-py3'
|
|
||||||
|
|
||||||
MacOS:
|
|
||||||
py2: 'py2'
|
|
||||||
py3: 'py3'
|
|
|
@ -3,4 +3,3 @@
|
||||||
---
|
---
|
||||||
salt:
|
salt:
|
||||||
release: '2017.7'
|
release: '2017.7'
|
||||||
py_ver: 'py2'
|
|
||||||
|
|
|
@ -3,4 +3,3 @@
|
||||||
---
|
---
|
||||||
salt:
|
salt:
|
||||||
release: '2018.3'
|
release: '2018.3'
|
||||||
py_ver: 'py2'
|
|
||||||
|
|
|
@ -3,4 +3,3 @@
|
||||||
---
|
---
|
||||||
salt:
|
salt:
|
||||||
release: '2019.2'
|
release: '2019.2'
|
||||||
py_ver: 'py2'
|
|
||||||
|
|
Loading…
Reference in New Issue