2019-06-22 19:24:19 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=sls
|
|
|
|
|
|
|
|
{%- set tplroot = tpldir.split('/')[0] %}
|
2020-05-14 01:27:23 +02:00
|
|
|
{%- from tplroot ~ "/map.jinja" import prometheus as p with context %}
|
2019-06-22 19:24:19 +02:00
|
|
|
|
2020-05-14 01:27:23 +02:00
|
|
|
{%- for name in p.wanted.component %}
|
2019-06-22 19:24:19 +02:00
|
|
|
|
|
|
|
prometheus-config-user-install-{{ name }}-user-present:
|
|
|
|
group.present:
|
|
|
|
- name: {{ name }}
|
|
|
|
- require_in:
|
|
|
|
- user: prometheus-config-user-install-{{ name }}-user-present
|
|
|
|
user.present:
|
|
|
|
- name: {{ name }}
|
|
|
|
- shell: /bin/false
|
|
|
|
- createhome: false
|
|
|
|
- groups:
|
|
|
|
- {{ name }}
|
2020-05-14 01:27:23 +02:00
|
|
|
{%- if grains.os_family == 'MacOS' %}
|
2019-06-23 15:04:48 +02:00
|
|
|
- unless: /usr/bin/dscl . list /Users | grep {{ name }} >/dev/null 2>&1
|
2020-05-14 01:27:23 +02:00
|
|
|
{%- endif %}
|
2019-06-22 19:24:19 +02:00
|
|
|
|
|
|
|
{%- endfor %}
|