ansible/roles/thanos/tasks/configure-component.yaml

16 lines
480 B
YAML
Raw Normal View History

2022-08-30 12:51:26 +00:00
---
- 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') }}"