From 21f8851bcce5326cddfa955879b80fbec76ab615 Mon Sep 17 00:00:00 2001 From: Lenard Fudala Date: Wed, 26 Jul 2023 15:17:31 -0500 Subject: [PATCH] fix(macos): use pillars for plist sources --- salt/master.sls | 2 +- salt/minion.sls | 2 +- salt/osmap.yaml | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/salt/master.sls b/salt/master.sls index af9d867d1..dfd3d7705 100644 --- a/salt/master.sls +++ b/salt/master.sls @@ -13,7 +13,7 @@ include: salt-master-macos: file.managed: - name: /Library/LaunchDaemons/com.saltstack.salt.master.plist - - source: https://raw.githubusercontent.com/saltstack/salt/master/pkg/osx/scripts/com.saltstack.salt.master.plist + - source: {{ salt_settings.salt_master_macos_plist_source }} - source_hash: {{ salt_settings.salt_master_macos_plist_hash }} - retry: {{ salt_settings.retry_options | json }} - require_in: diff --git a/salt/minion.sls b/salt/minion.sls index 97db5b321..fdc3ddd74 100644 --- a/salt/minion.sls +++ b/salt/minion.sls @@ -42,7 +42,7 @@ salt-minion-macos: file.managed: - onlyif: {{ grains.os == 'MacOS' }} - name: /Library/LaunchDaemons/com.saltstack.salt.minion.plist - - source: https://raw.githubusercontent.com/saltstack/salt/master/pkg/osx/scripts/com.saltstack.salt.master.plist + - source: {{ salt_settings.salt_minion_macos_plist_source }} - source_hash: {{ salt_settings.salt_minion_macos_plist_hash }} - retry: {{ salt_settings.retry_options | json }} - require_in: diff --git a/salt/osmap.yaml b/salt/osmap.yaml index 7c46a209b..81ecad455 100644 --- a/salt/osmap.yaml +++ b/salt/osmap.yaml @@ -7,6 +7,9 @@ {%- set repoarch = salt['grains.get']('osarch') %} {%- set osrelease = salt['grains.get']('osrelease', '') %} {%- set salt_release = salt['pillar.get']('salt:release', 'latest') %} +{%- if salt_release != "latest" %} +{%- set salt_release_major = salt_release.split('.') | map('.') | list | first %} +{%- endif %} {%- if salt_release.split('.')|length >= 3 %} {%- set salt_release = 'archive/' ~ salt_release %} {%- endif %} @@ -69,8 +72,10 @@ SmartOS: MacOS: minion_service: com.saltstack.salt.minion master_service: com.saltstack.salt.master - salt_master_macos_plist_hash: 8435331b2d48ca8f0759f216e5b15ec9171a4216b1441328c732c6906728b7c9 - salt_minion_macos_plist_hash: 26b33da12e0d8960ee96b488c8352002c22a377c19bf3df3f986a1e49eca8b20 + salt_master_macos_plist_source: https://github.com/saltstack/salt/raw/master/pkg/macos/scripts/com.saltstack.salt.master.plist + salt_minion_macos_plist_source: https://github.com/saltstack/salt/raw/master/pkg/macos/scripts/com.saltstack.salt.minion.plist + salt_master_macos_plist_hash: 97666226c14ec2fd755edb5d909688540a36408dfe9fb34a1c15676020376ace + salt_minion_macos_plist_hash: 17d9556b5742a785eaddaec117132be99af138cab7157dbacbda2058538b6e69 FreeBSD: salt_master: py39-salt