mirror of
https://github.com/saltstack-formulas/salt-formula.git
synced 2026-05-17 03:42:52 +02:00
Merge e2c747ab944612ef8921bd509aa841441e3888f8 into 543760ac1ca889671b8ab523d1a7e48ebb6bdad9
This commit is contained in:
commit
f28f78a15b
@ -212,6 +212,9 @@ permissions-minion-config:
|
|||||||
- replace: False
|
- replace: False
|
||||||
{% endif %}
|
{% 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:
|
salt-minion-pki-dir:
|
||||||
file.directory:
|
file.directory:
|
||||||
{% if 'pki_dir' in salt_settings.minion %}
|
{% if 'pki_dir' in salt_settings.minion %}
|
||||||
@ -221,13 +224,22 @@ salt-minion-pki-dir:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
- user: {{ salt_settings.rootuser }}
|
- user: {{ salt_settings.rootuser }}
|
||||||
- group:
|
- group:
|
||||||
|
{%- if syndic_user is none %}
|
||||||
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
|
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
|
||||||
wheel
|
wheel
|
||||||
{%- else %}
|
{%- else %}
|
||||||
{{ salt_settings.rootgroup }}
|
{{ salt_settings.rootgroup }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
{%- else %}
|
||||||
|
{{ syndic_user }}
|
||||||
|
{%- endif %}
|
||||||
{%- if grains['kernel'] != 'Windows' %}
|
{%- if grains['kernel'] != 'Windows' %}
|
||||||
- mode: 700
|
- mode:
|
||||||
|
{%- if syndic_user is none %}
|
||||||
|
700
|
||||||
|
{%- else %}
|
||||||
|
750
|
||||||
|
{%- endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- makedirs: True
|
- makedirs: True
|
||||||
|
|
||||||
@ -238,7 +250,7 @@ permissions-minion.pem:
|
|||||||
{% else %}
|
{% else %}
|
||||||
- name: {{ salt_settings.config_path | path_join('pki', 'minion', 'minion.pem') }}
|
- name: {{ salt_settings.config_path | path_join('pki', 'minion', 'minion.pem') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- user: {{ salt_settings.rootuser }}
|
- user: {{ salt_settings.rootuser if syndic_user is none else syndic_user }}
|
||||||
- group:
|
- group:
|
||||||
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
|
{%- if grains['kernel'] in ['FreeBSD', 'OpenBSD', 'NetBSD'] %}
|
||||||
wheel
|
wheel
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user