Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS compatibility #531

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions salt/minion.sls
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ download-salt-minion:
- group: wheel
- mode: '0644'
- unless:
- test -n "{{ salt_settings.version }}" && '/opt/salt/bin/salt-minion --version=.*{{ salt_settings.version }}.*'
- test -n "{{ salt_settings.version }}" && /opt/salt/bin/salt-minion --version | grep -E '{{ salt_settings.version }}$'
- require_in:
- macpackage: salt-minion
- retry: {{ salt_settings.retry_options | json }}
Expand Down Expand Up @@ -58,13 +58,13 @@ salt-minion:
{# macpackage.installed is weird with version_check, detects diff but incomplete install #}
- force: True {# workaround #}
- unless:
- test -n "{{ salt_settings.version }}" && '/opt/salt/bin/salt-minion --version=.*{{ salt_settings.version }}.*'
- test -n "{{ salt_settings.version }}" && /opt/salt/bin/salt-minion --version | grep -E '{{ salt_settings.version }}$'
{% if salt_settings.minion_service_details.state != 'ignore' %}
- require_in:
- service: salt-minion
{% endif %}
- onchanges_in:
- cmd: remove-macpackage-salt
- file: remove-macpackage-salt
{%- elif grains.os != 'MacOS' and "workaround https://github.com/saltstack/salt/issues/49348" %}
pkg.installed:
- name: {{ salt_settings.salt_minion }}
Expand Down Expand Up @@ -198,7 +198,7 @@ permissions-minion-config:
- name: {{ salt_settings.config_path | path_join('minion') }}
- user: {{ salt_settings.rootuser }}
- group:
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD', 'Darwin'] %}
wheel
{%- else %}
root
Expand All @@ -218,7 +218,7 @@ salt-minion-pki-dir:
{% endif %}
- user: {{ salt_settings.rootuser }}
- group:
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD', 'Darwin'] %}
wheel
{%- else %}
root
Expand All @@ -237,7 +237,7 @@ permissions-minion.pem:
{% endif %}
- user: {{ salt_settings.rootuser }}
- group:
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD', 'Darwin'] %}
wheel
{%- else %}
root
Expand All @@ -258,7 +258,7 @@ permissions-minion.pub:
{% endif %}
- user: {{ salt_settings.rootuser }}
- group:
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD', 'Darwin'] %}
wheel
{%- else %}
root
Expand Down