# -*- coding: utf-8 -*- # vim: ft=yaml # # Setup variables using grains['os_family'] based logic. # You just need to add the key:values for an `os_family` that differ # from `defaults.yaml`. # Only add an `os_family` which is/will be supported by the formula # # If you do not need to provide defaults via the `os_family` grain, # you will need to provide at least an empty dict in this file, e.g. # osfamilymap: {} --- {%- if grains.os == 'MacOS' %} {% set macos_user = salt['cmd.run']("stat -f '%Su' /dev/console") %} {% set macos_group = salt['cmd.run']("stat -f '%Sg' /dev/console") %} {%- endif %} Debian: args_file: /etc/default/prometheus exporters: node: config_file: /etc/default/prometheus-node-exporter RedHat: pkg: use_upstream_repo: True repo: baseurl: 'https://packagecloud.io/prometheus-rpm/release/el/$releasever/$basearch' gpgkey: 'https://packagecloud.io/prometheus-rpm/release/gpgkey gpgkey2=https://raw.githubusercontent.com/lest/prometheus-rpm/master/RPM-GPG-KEY-prometheus-rpm' metadata_expire: 300 Suse: {} Gentoo: {} Arch: {} Alpine: {} FreeBSD: rootgroup: wheel config_file: /usr/local/etc/prometheus.yml exporters: node: pkg: name: node_exporter service: node_exporter OpenBSD: rootgroup: wheel Solaris: {} Windows: {} MacOS: rootuser: {{ macos_user | d('') }} rootgroup: {{ macos_group | d('') }}