From beb0e85b0436e1f3475e351f1b23a73f1e41fc72 Mon Sep 17 00:00:00 2001 From: N Date: Thu, 1 Aug 2019 12:52:46 +0100 Subject: [PATCH] fix(perms): some os have custom user/root --- salt/defaults.yaml | 1 + salt/formulas.sls | 6 ++++++ salt/osfamilymap.yaml | 1 + 3 files changed, 8 insertions(+) diff --git a/salt/defaults.yaml b/salt/defaults.yaml index afe1420..21c3b30 100644 --- a/salt/defaults.yaml +++ b/salt/defaults.yaml @@ -3,6 +3,7 @@ salt: version: '' rootuser: root + rootgroup: root install_packages: True use_pip: False clean_config_d_dir: True diff --git a/salt/formulas.sls b/salt/formulas.sls index 7eb8be0..27b49b2 100644 --- a/salt/formulas.sls +++ b/salt/formulas.sls @@ -6,6 +6,10 @@ {%- from "salt/formulas.jinja" import formulas_git_opt with context %} {%- from "salt/formulas.jinja" import formulas_opts_for_git_latest with context %} +## from template-formula +{%- set tplroot = tpldir.split('/')[0] %} +{%- from tplroot ~ "/map.jinja" import salt_settings with context %} + # Loop over all formulas listed in pillar data {%- for env, entries in salt['pillar.get']('salt_formulas:list', {}).items() %} {%- for entry in entries %} @@ -31,6 +35,8 @@ {%- for key, value in salt['pillar.get']('salt_formulas:basedir_opts', {'makedirs': True}).items() %} - {{ key }}: {{ value }} + - user: {{ salt_settings.rootuser }} + - group: {{ salt_settings.rootgroup }} {%- endfor %} {%- endif %} diff --git a/salt/osfamilymap.yaml b/salt/osfamilymap.yaml index a1f5684..79f8932 100644 --- a/salt/osfamilymap.yaml +++ b/salt/osfamilymap.yaml @@ -96,6 +96,7 @@ Alpine: libgit2: libgit2 FreeBSD: + rootgroup: wheel salt_master: py27-salt salt_minion: py27-salt salt_syndic: py27-salt