0
0
mirror of https://github.com/saltstack-formulas/salt-formula.git synced 2026-02-06 17:35:23 +01:00

Merge e2c747ab944612ef8921bd509aa841441e3888f8 into 5adb9c2075d118c6c48c9bd6e7c8564dfc073a36

This commit is contained in:
Georg 2026-01-09 01:42:34 +00:00 committed by GitHub
commit c7b66110da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -212,6 +212,9 @@ permissions-minion-config:
- replace: False
{% endif %}
{#- we assume a group with the same name as the user exists #}
{%- set syndic_user = salt_settings.get('master', {}).get('syndic_user') %}
salt-minion-pki-dir:
file.directory:
{% if 'pki_dir' in salt_settings.minion %}
@ -221,13 +224,22 @@ salt-minion-pki-dir:
{% endif %}
- user: {{ salt_settings.rootuser }}
- group:
{%- if syndic_user is none %}
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
wheel
{%- else %}
{{ salt_settings.rootgroup }}
{%- endif %}
{%- else %}
{{ syndic_user }}
{%- endif %}
{%- if grains['kernel'] != 'Windows' %}
- mode: 700
- mode:
{%- if syndic_user is none %}
700
{%- else %}
750
{%- endif %}
{% endif %}
- makedirs: True
@ -238,7 +250,7 @@ permissions-minion.pem:
{% else %}
- name: {{ salt_settings.config_path | path_join('pki', 'minion', 'minion.pem') }}
{% endif %}
- user: {{ salt_settings.rootuser }}
- user: {{ salt_settings.rootuser if syndic_user is none else syndic_user }}
- group:
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
wheel