prometheus-formula/prometheus/config/users.sls
N ce5b7712c9 refactor(all): align to template-formula; add clientlibs feature
BREAKING CHANGE: The data dictionary is simplified and expanded.
Retest your states and update pillar data accordingly.
For developer convenience, clientlibs states were introduced.
See pillar.example, defaults.yaml, and docs/README.
2020-05-15 11:12:28 +01:00

25 lines
669 B
Plaintext

# -*- coding: utf-8 -*-
# vim: ft=sls
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import prometheus as p with context %}
{%- for name in p.wanted.component %}
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 }}
{%- if grains.os_family == 'MacOS' %}
- unless: /usr/bin/dscl . list /Users | grep {{ name }} >/dev/null 2>&1
{%- endif %}
{%- endfor %}