ansible-collection-prometheus/roles/blackbox_exporter/tasks/configure.yml
SuperQ 588807e4d8
feat(blackbox_exporter) Create config directory
Follow the pattern of other exporters and create the configuration file
in `/etc/blackbox_exporter` by default.

Signed-off-by: SuperQ <superq@gmail.com>
2023-11-28 22:37:04 +01:00

28 lines
740 B
YAML

---
- name: Create systemd service unit
ansible.builtin.template:
src: blackbox_exporter.service.j2
dest: /etc/systemd/system/blackbox_exporter.service
owner: root
group: root
mode: '0644'
notify:
- restart blackbox_exporter
- name: Create blackbox_exporter config directory
ansible.builtin.file:
path: "{{ blackbox_exporter_config_dir }}"
state: directory
owner: root
group: root
mode: u+rwX,g+rwX,o=rX
- name: Configure blackbox exporter
ansible.builtin.template:
src: blackbox_exporter.yml.j2
dest: "{{ blackbox_exporter_config_dir }}/blackbox_exporter.yml"
owner: root
group: "{{ blackbox_exporter_group }}"
mode: '0644'
notify:
- reload blackbox_exporter