refactor: move config to template

Signed-off-by: gardar <gardar@users.noreply.github.com>
This commit is contained in:
gardar 2024-03-08 19:22:39 +00:00
parent 7def6b81a4
commit 894db57168
No known key found for this signature in database
GPG key ID: 75FAE37CBA8C13C2
2 changed files with 7 additions and 6 deletions

View file

@ -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

View file

@ -0,0 +1,5 @@
---
{{ ansible_managed | comment }}
process_names:
{{ process_exporter_names }}