feat(config/users): add support for debian-11 [skip ci]

Avoid this failure when installing the package:

```
Setting up prometheus (2.24.1+ds-1+b5) ...
adduser: The user `prometheus' already exists, but is not a system user. Exiting.
dpkg: error processing package prometheus (--configure):
 installed prometheus package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 prometheus
```
This commit is contained in:
Imran Iqbal 2021-07-18 14:40:17 +01:00
parent 32039539bb
commit 0e65cc345b
No known key found for this signature in database
GPG Key ID: 6D8629439D2B7819

View File

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