From 50ee42354dc5ea3d4fce269cb3bf7fe022effd0e Mon Sep 17 00:00:00 2001 From: N Date: Wed, 31 Jul 2019 17:09:50 +0100 Subject: [PATCH] fix(macos): fix package name for homebrew --- salt/minion.sls | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/salt/minion.sls b/salt/minion.sls index 391defa74..c41b01b43 100644 --- a/salt/minion.sls +++ b/salt/minion.sls @@ -2,9 +2,10 @@ {%- from tplroot ~ "/map.jinja" import salt_settings with context %} {%- from tplroot ~ "/libtofs.jinja" import files_switch with context %} -{% if salt_settings.install_packages and grains.os == 'MacOS' and salt_settings.salt_minion_pkg_source != '' and salt_settings.version != '' %} -{# only download IF we know where to get the pkg from and if we know what version to check the current install (if installed) against #} -{# e.g. don't download unless it appears as though we're about to try and upgrade the minion #} +{% if salt_settings.install_packages and grains.os == 'MacOS' %} + {%- if salt_settings.salt_minion_pkg_source and salt_settings.version %} + {# only download IF we know where to get the pkg from and if we know what version to check the current install (if installed) against #} + {# e.g. don't download unless it appears as though we're about to try and upgrade the minion #} download-salt-minion: file.managed: - name: '/tmp/salt.pkg' @@ -21,7 +22,11 @@ download-salt-minion: - '/opt/salt/bin/salt-minion --version | grep {{ salt_settings.version }}' - require_in: - macpackage: salt-minion -{% endif %} + {%- else %} + {# homebrew package name #} + {%- do salt_settings.update({'salt_minion': 'salt'}) %} + {%- endif %} +{%- endif %} salt-minion: {% if salt_settings.install_packages %}