Skip to content

Commit

Permalink
fix(macos): fix package name for homebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
noelmcloughlin committed Jul 31, 2019
1 parent 6a31254 commit 50ee423
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions salt/minion.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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 %}
Expand Down

0 comments on commit 50ee423

Please sign in to comment.