ansible/roles/thanos/tasks/configure-component.yaml
2022-08-30 07:51:26 -05:00

16 lines
480 B
YAML

---
- name: "{{ item }}: configure systemd"
template:
src: "{{ item }}.service.j2"
dest: "/etc/systemd/system/{{ item }}.service"
owner: root
group: root
mode: 0444
notify: "restart {{ item | replace('-', ' ')}}"
- name: "{{ item }}: manage service"
service:
name: "{{ item }}.service"
enabled: "{{ lookup('vars', item | replace('-', '_') + '_service_enabled') }}"
state: "{{ lookup('vars', item | replace('-', '_') + '_service_state') }}"