2
0

Merge pull request #397 from myii/PR_364-py3

Fix `repo.saltstack.com` URLs for Python 3 packages (#364)
This commit is contained in:
Niels Abspoel 2019-02-01 17:37:23 +01:00 committed by GitHub
commit 5eee4c61dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 50 additions and 11 deletions

View File

@ -10,6 +10,10 @@ salt:
# This state will remove "/etc/salt/master" when you set this to true.
master_remove_config: True
# Set this to 'py3' to install the Python 3 packages.
# If this is not set, the Python 2 packages will be installed by default.
py_ver: 'py3'
# Set this to False to not have the formula install packages (in the case you
# install Salt via git/pip/etc.)
install_packages: True

View File

@ -1,6 +1,10 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
{% import_yaml "salt/ospyvermap.yaml" as ospyvermap %}
{% 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 salt_release = salt['pillar.get']('salt:release', 'latest') %}
{% if salt_release.split('.')|length >= 3 %}
@ -11,8 +15,8 @@
{% set oscodename = salt['grains.get']('oscodename') %}
Debian:
pkgrepo: 'deb http://repo.saltstack.com/apt/{{ os_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }} {{ oscodename }} main'
key_url: 'https://repo.saltstack.com/apt/{{ os_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
pkgrepo: 'deb http://repo.saltstack.com/{{ py_ver_dir }}/{{ os_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }} {{ oscodename }} main'
key_url: 'https://repo.saltstack.com/{{ py_ver_dir }}/{{ os_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
libgit2: libgit2-22
pyinotify: python-pyinotify
gitfs:
@ -26,8 +30,8 @@ Debian:
install_from_source: False
RedHat:
pkgrepo: 'https://repo.saltstack.com/yum/redhat/$releasever/$basearch/{{ salt_release }}'
key_url: 'https://repo.saltstack.com/yum/redhat/$releasever/$basearch/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
pkgrepo: 'https://repo.saltstack.com/{{ py_ver_dir }}/redhat/$releasever/$basearch/{{ salt_release }}'
key_url: 'https://repo.saltstack.com/{{ py_ver_dir }}/redhat/$releasever/$basearch/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
pygit2: python-pygit2
python_git: GitPython
gitfs:

View File

@ -1,6 +1,10 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
{% import_yaml "salt/ospyvermap.yaml" as ospyvermap %}
{% 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 salt_release = salt['pillar.get']('salt:release', 'latest') %}
{% if salt_release.split('.')|length >= 3 %}
@ -14,8 +18,8 @@ Fedora:
pygit2: python2-pygit2
Ubuntu:
pkgrepo: 'deb http://repo.saltstack.com/apt/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }} {{ oscodename }} main'
key_url: 'https://repo.saltstack.com/apt/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
pkgrepo: 'deb http://repo.saltstack.com/{{ py_ver_dir }}/{{ 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'
pygit2: python-pygit2
gitfs:
pygit2:
@ -25,8 +29,8 @@ Ubuntu:
install_from_package: Null
Raspbian:
pkgrepo: 'deb http://repo.saltstack.com/apt/{{ os_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }} {{ oscodename }} main'
key_url: 'https://repo.saltstack.com/apt/{{ os_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
pkgrepo: 'deb http://repo.saltstack.com/{{ py_ver_dir }}/{{ os_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }} {{ oscodename }} main'
key_url: 'https://repo.saltstack.com/{{ py_ver_dir }}/{{ os_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
SmartOS:
salt_master: salt
@ -45,6 +49,3 @@ SmartOS:
config_path: /opt/local/etc/salt
master:
gitfs_provider: dulwich

30
salt/ospyvermap.yaml Normal file
View File

@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
Debian:
py2: 'apt'
py3: 'py3'
RedHat:
py2: 'yum'
py3: 'py3'
Suse: {}
Gentoo: {}
Arch: {}
Alpine: {}
FreeBSD: {}
OpenBSD: {}
Windows:
py2: 'Py2'
py3: 'Py3'
MacOS:
py2: 'py2'
py3: 'py3'