From f5ab70e90bb8512f04eb790006c5493962bc030a Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Tue, 16 Apr 2019 22:49:18 +0100 Subject: [PATCH 1/2] refactor(osfamilymap): rename `py_ver_dir` since not only for dirs * Prepare for selecting correct version of Windows `salt-minion` pkg --- salt/osfamilymap.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/salt/osfamilymap.yaml b/salt/osfamilymap.yaml index 14fb850..abe1612 100644 --- a/salt/osfamilymap.yaml +++ b/salt/osfamilymap.yaml @@ -3,7 +3,7 @@ {% 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 py_ver_repr = 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') %} @@ -15,8 +15,8 @@ {% set oscodename = salt['grains.get']('oscodename') %} Debian: - pkgrepo: 'deb http://repo.saltstack.com/{{ py_ver_dir }}/{{ osfamily_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }} {{ oscodename }} main' - key_url: 'https://repo.saltstack.com/{{ py_ver_dir }}/{{ osfamily_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }}/SALTSTACK-GPG-KEY.pub' + pkgrepo: 'deb http://repo.saltstack.com/{{ py_ver_repr }}/{{ 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' libgit2: libgit2-22 pyinotify: python-pyinotify gitfs: @@ -30,8 +30,8 @@ Debian: install_from_source: False RedHat: - 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' + pkgrepo: 'https://repo.saltstack.com/{{ py_ver_repr }}/redhat/$releasever/$basearch/{{ salt_release }}' + key_url: 'https://repo.saltstack.com/{{ py_ver_repr }}/redhat/$releasever/$basearch/{{ salt_release }}/SALTSTACK-GPG-KEY.pub' pygit2: python-pygit2 python_git: GitPython gitfs: From 1f0cefdb782b5dc453186a5c66c2d725eceb1b7d Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Tue, 16 Apr 2019 23:00:35 +0100 Subject: [PATCH 2/2] fix(windows): use correct `salt-minion` package name * From `salt-winrepo-ng`: + https://github.com/saltstack/salt-winrepo-ng/blob/master/salt-minion-py2.sls - Package: `salt-minion` + https://github.com/saltstack/salt-winrepo-ng/blob/master/salt-minion-py3.sls - Package: `salt-minion-py3` * Close #411 --- salt/osfamilymap.yaml | 2 +- salt/ospyvermap.yaml | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/salt/osfamilymap.yaml b/salt/osfamilymap.yaml index abe1612..b0a5fc0 100644 --- a/salt/osfamilymap.yaml +++ b/salt/osfamilymap.yaml @@ -117,7 +117,7 @@ OpenBSD: python_git: py-GitPython Windows: - salt_minion: salt-minion + salt_minion: salt-minion{{ py_ver_repr }} config_path: 'C:\salt\conf' minion_service: salt-minion diff --git a/salt/ospyvermap.yaml b/salt/ospyvermap.yaml index 8e32918..8b6cfda 100644 --- a/salt/ospyvermap.yaml +++ b/salt/ospyvermap.yaml @@ -21,9 +21,13 @@ 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: 'Py2' - py3: 'Py3' + py2: '' + py3: '-py3' MacOS: py2: 'py2'