From bda2a7ce8994d10ac2d279d45a2c3fdafdc6f6f7 Mon Sep 17 00:00:00 2001 From: N Date: Fri, 31 May 2019 11:09:42 +0100 Subject: [PATCH] feat(macos): basic package and group handling --- grafana/config/file.sls | 1 + grafana/osfamilymap.yaml | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/grafana/config/file.sls b/grafana/config/file.sls index 2a2c2a5..18a2b11 100644 --- a/grafana/config/file.sls +++ b/grafana/config/file.sls @@ -20,6 +20,7 @@ grafana-config-file-file-managed: - mode: 640 - user: root - group: {{ grafana.group }} + - makedirs: True - template: jinja - context: config: {{ grafana.config|json }} diff --git a/grafana/osfamilymap.yaml b/grafana/osfamilymap.yaml index df34c6e..bd0f909 100644 --- a/grafana/osfamilymap.yaml +++ b/grafana/osfamilymap.yaml @@ -10,6 +10,10 @@ # you will need to provide at least an empty dict in this file, e.g. # osfamilymap: {} --- +{%- if grains.os == 'MacOS' %} + {% set macos_group = salt['cmd.run']("stat -f '%Sg' /dev/console") %} +{%- endif %} + Debian: pkgrepo: humanname: grafana_official @@ -47,4 +51,7 @@ Solaris: {} Windows: {} -MacOS: {} +MacOS: + rootgroup: {{ macos_group | d('') }} + service: + group: {{ macos_group | d('') }}