From 68f8d57e05a2999eb048f63ce2e55e18bf7b8fde Mon Sep 17 00:00:00 2001 From: Raluca Samuilescu Date: Thu, 24 Jan 2019 22:09:47 +0000 Subject: [PATCH] Fix `repo.saltstack.com` URLs for pinned minor release (#364) * All minor releases appear in an `archive` sub-directory. * Resolves main bug in GitHub issue #364. * Simplification of original GitHub PR #365 by @ralucasg. --- salt/map.jinja | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/salt/map.jinja b/salt/map.jinja index ea5bfd7..b873fd3 100644 --- a/salt/map.jinja +++ b/salt/map.jinja @@ -41,6 +41,12 @@ that differ from whats in defaults.yaml ##} {% set osrelease = salt['grains.get']('osrelease') %} {% set salt_release = salt['pillar.get']('salt:release', 'latest') %} + +{# All minor releases appear in an `archive` sub-directory #} +{% if salt_release.split('.')|length >= 3 %} +{% set salt_release = 'archive/' ~ salt_release %} +{% endif %} + {% set os_family_map = salt['grains.filter_by']({ 'Debian': { 'pkgrepo': 'deb http://repo.saltstack.com/apt/' +