fix(users): users should always be created as system users

This commit is contained in:
Michael Schmitt 2021-12-09 00:54:12 -07:00
parent 4aa4777b03
commit ee20f821d6
No known key found for this signature in database
GPG Key ID: 5145CC5841E00C15

View File

@ -21,9 +21,7 @@ prometheus-config-users-install-{{ name }}-user-present:
- shell: {{ p.shell }} - shell: {{ p.shell }}
{%- if grains.kernel|lower == 'linux' %} {%- if grains.kernel|lower == 'linux' %}
- createhome: false - createhome: false
{%- if grains.get('osfinger', '') in ['Debian-11'] %}
- system: true - system: true
{%- endif %}
{%- elif grains.os_family == 'MacOS' %} {%- elif grains.os_family == 'MacOS' %}
- unless: /usr/bin/dscl . list /Users | grep {{ name }} >/dev/null 2>&1 - unless: /usr/bin/dscl . list /Users | grep {{ name }} >/dev/null 2>&1
{%- endif %} {%- endif %}