feat(macos): basic package and group handling

This commit is contained in:
N 2019-05-31 11:02:41 +01:00
parent 9f03988145
commit e6a8b0c78d
No known key found for this signature in database
GPG Key ID: 55A292EAB4E54067
2 changed files with 7 additions and 1 deletions

View File

@ -20,6 +20,7 @@ prometheus-config-file-file-managed:
- mode: 644 - mode: 644
- user: root - user: root
- group: {{ prometheus.rootgroup }} - group: {{ prometheus.rootgroup }}
- makedirs: True
- template: jinja - template: jinja
- context: - context:
config: {{ prometheus.config|json }} config: {{ prometheus.config|json }}

View File

@ -10,6 +10,10 @@
# you will need to provide at least an empty dict in this file, e.g. # you will need to provide at least an empty dict in this file, e.g.
# osfamilymap: {} # osfamilymap: {}
--- ---
{%- if grains.os == 'MacOS' %}
{% set macos_group = salt['cmd.run']("stat -f '%Sg' /dev/console") %}
{%- endif %}
Debian: Debian:
args_file: /etc/default/prometheus args_file: /etc/default/prometheus
exporters: exporters:
@ -41,4 +45,5 @@ Solaris: {}
Windows: {} Windows: {}
MacOS: {} MacOS:
rootgroup: {{ macos_group | d('') }}