saltstack-formulas / prometheus-formula

Manage a Prometheus installation
Other
27 stars 51 forks source link

Should all users created by this formula be `system` users? #70

Closed myii closed 2 years ago

myii commented 3 years ago

When preparing this formula for Debian 11 support, came across the following problem:

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

Resolved this with 0e65cc345b316412fad4ce9966f99d86c9fa829c. However, I wouldn't be surprised if this should be done for all Linux-based installations. In that case, the fix is easy:

https://github.com/saltstack-formulas/prometheus-formula/blob/0e65cc345b316412fad4ce9966f99d86c9fa829c/prometheus/config/users.sls#L22-L26

Just need to remove the nested if statements:

                    {%- if grains.kernel|lower == 'linux' %}
      - createhome: false
-                     {%- if grains.get('osfinger', '') in ['Debian-11'] %}
      - system: true
-                     {%- endif %}
saltstack-formulas-travis commented 2 years ago

:tada: This issue has been resolved in version 5.6.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: