Skip to content

Commit

Permalink
fix(minion.sls): fix for saltstack-formulas#541
Browse files Browse the repository at this point in the history
  • Loading branch information
mlalpho committed Aug 28, 2023
1 parent 2a7a9de commit 99cad77
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions salt/minion.sls
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ download-salt-minion:
{% else %}
- skip_verify: True
{% endif %}
{%- if grains['kernel'] != 'Windows' %}
- user: {{ salt_settings.rootuser }}
- group: {{ salt_settings.rootgroup }}
{% endif %}
- mode: '0644'
- unless:
- test -n "{{ salt_settings.version }}" && '/opt/salt/bin/salt-minion --version=.*{{ salt_settings.version }}.*'
Expand Down Expand Up @@ -199,13 +201,15 @@ remove-macpackage-salt:
permissions-minion-config:
file.managed:
- name: {{ salt_settings.config_path | path_join('minion') }}
{%- if grains['kernel'] != 'Windows' %}
- user: {{ salt_settings.rootuser }}
- group:
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
wheel
{%- else %}
{{ salt_settings.rootgroup }}
{%- endif %}
{% endif %}
{%- if grains['kernel'] != 'Windows' %}
- mode: 640
{% endif %}
Expand All @@ -218,14 +222,16 @@ salt-minion-pki-dir:
- name: {{ salt_settings.minion.pki_dir }}
{% else %}
- name: {{ salt_settings.config_path | path_join('pki', 'minion') }}
{% endif %}
{% endif %}
{%- if grains['kernel'] != 'Windows' %}
- user: {{ salt_settings.rootuser }}
- group:
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
wheel
{%- else %}
{{ salt_settings.rootgroup }}
{%- endif %}
{% endif %}
{%- if grains['kernel'] != 'Windows' %}
- mode: 700
{% endif %}
Expand All @@ -237,14 +243,16 @@ permissions-minion.pem:
- name: {{ salt_settings.minion.pki_dir | path_join('minion.pem') }}
{% else %}
- name: {{ salt_settings.config_path | path_join('pki', 'minion', 'minion.pem') }}
{% endif %}
{% endif %}
{%- if grains['kernel'] != 'Windows' %}
- user: {{ salt_settings.rootuser }}
- group:
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
wheel
{%- else %}
{{ salt_settings.rootgroup }}
{%- endif %}
{% endif %}
{%- if grains['kernel'] != 'Windows' %}
- mode: 400
{% endif %}
Expand Down

1 comment on commit 99cad77

@TheBigBear
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested. This fixes the issue. Please merge it.

Please sign in to comment.