salt-states/containers/prometheus.sls
2023-06-27 09:16:37 +02:00

27 lines
598 B
Plaintext

{% from 'lib.sls' import container_deploy with context %}
Create prometheus config directory:
file.recurse:
- name: /etc/prometheus
- source: salt://containers/files/prometheus
- user: nobody
- group: root
- dir_mode: "0755"
- file_mode: "0644"
Create prometheus data directory:
file.directory:
- name: /srv/prometheus
- user: nobody
- group: root
- mode: "0755"
{{ container_deploy('prometheus') }}
Start prometheus service:
service.running:
- name: prometheus
- enable: True
- watch:
- file: Create prometheus config directory