Merge pull request #2 from noelmcloughlin/macos_1

feat(macos): basic package and group handling
This commit is contained in:
N 2019-06-05 23:05:16 +01:00 committed by GitHub
commit e58bf2255e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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('') }}