salt-states/containers/prometheus.sls

27 lines
598 B
Plaintext
Raw Permalink Normal View History

2023-06-27 07:16:37 +00:00
{% 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