mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 11:53:12 +00:00
refactor: move config to template
Signed-off-by: gardar <gardar@users.noreply.github.com>
This commit is contained in:
parent
7def6b81a4
commit
894db57168
2 changed files with 7 additions and 6 deletions
|
@ -17,16 +17,12 @@
|
|||
mode: u+rwX,g+rwX,o=rX
|
||||
|
||||
- name: Create/Update configuration file
|
||||
ansible.builtin.copy:
|
||||
ansible.builtin.template:
|
||||
src: "config.yml.j2"
|
||||
dest: "/etc/process_exporter/config.yml"
|
||||
content: |
|
||||
process_names:
|
||||
{{ process_exporter_names }}
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when:
|
||||
- process_exporter_names != []
|
||||
notify: restart process_exporter
|
||||
|
||||
- name: Allow process_exporter port in SELinux on RedHat OS family
|
||||
|
|
5
roles/process_exporter/templates/config.yml.j2
Normal file
5
roles/process_exporter/templates/config.yml.j2
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
process_names:
|
||||
{{ process_exporter_names }}
|
Loading…
Reference in a new issue