ansible-infra/roles/knot/tasks/03-configure-exporter.yaml
June 73e77bde70
All checks were successful
/ Ansible Lint (pull_request) Successful in 3m18s
/ Ansible Lint (push) Successful in 2m20s
tag plays in playbooks (instead of tasks in roles)
2026-05-19 00:24:10 +02:00

18 lines
519 B
YAML

- name: Deploy knot-exporter systemd unit
become: true
register: knot_deploy_service_file
notify: restart knot-exporter
ansible.builtin.template:
src: knot-exporter.service.j2
dest: /etc/systemd/system/knot-exporter.service
owner: root
group: root
mode: u=rw,g=r,o=r
- name: Ensure knot-exporter is running and enabled
become: true
ansible.builtin.systemd:
name: knot-exporter.service
state: started
enabled: true
daemon_reload: "{{ knot_deploy_service_file.changed }}"