Skip to content

Commit

Permalink
Update minion.sls
Browse files Browse the repository at this point in the history
  • Loading branch information
mlalpho authored Aug 24, 2023
1 parent 2a7a9de commit 5668a1e
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

0 comments on commit 5668a1e

Please sign in to comment.