Remove hardcoded username

Change-Id: I3103dc4c174be7b8c199508b0b53941e687012bf
Depends-On: Ib4c218af6e880963cadff807246d65ff68ddf5e1
This commit is contained in:
Bartosz Kupidura 2017-06-19 14:54:45 +02:00
parent 82366ab6d2
commit 45d0bb8fe7
3 changed files with 0 additions and 12 deletions

View file

@ -7,13 +7,10 @@
file.directory: file.directory:
- makedirs: True - makedirs: True
# prometheus user is available inside docker container not on docker host
# in dockerfile for alertmanager we ensure that it will have 999 uid
{{alertmanager.dir.data}}: {{alertmanager.dir.data}}:
file.directory: file.directory:
- makedirs: True - makedirs: True
- mode: 755 - mode: 755
- user: {{alertmanager.user}}
{{alertmanager.dir.config}}/alertmanager.yml: {{alertmanager.dir.config}}/alertmanager.yml:
file.managed: file.managed:

View file

@ -1,11 +1,5 @@
{% set server = salt['grains.filter_by']({ {% set server = salt['grains.filter_by']({
'default': {
'user': '999',
},
}, merge=salt['pillar.get']('prometheus:server')) %} }, merge=salt['pillar.get']('prometheus:server')) %}
{% set alertmanager = salt['grains.filter_by']({ {% set alertmanager = salt['grains.filter_by']({
'default': {
'user': '999',
},
}, merge=salt['pillar.get']('prometheus:alertmanager')) %} }, merge=salt['pillar.get']('prometheus:alertmanager')) %}

View file

@ -7,13 +7,10 @@
file.directory: file.directory:
- makedirs: True - makedirs: True
# prometheus user is available inside docker container not on docker host
# in dockerfile for prometheus we ensure that it will have 999 uid
{{server.dir.data}}: {{server.dir.data}}:
file.directory: file.directory:
- makedirs: True - makedirs: True
- mode: 755 - mode: 755
- user: {{server.user}}
{{server.dir.config}}/prometheus.yml: {{server.dir.config}}/prometheus.yml:
file.managed: file.managed: