2018-12-06 02:59:47 +08:00
|
|
|
---
|
|
|
|
- name: ship systemd services
|
2019-04-08 21:40:25 +08:00
|
|
|
template:
|
2019-05-13 22:21:16 +08:00
|
|
|
src: "{{ item }}.j2"
|
|
|
|
dest: "/etc/systemd/system/{{ item }}"
|
2018-12-06 02:59:47 +08:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
with_items:
|
|
|
|
- 'alertmanager.service'
|
|
|
|
- 'prometheus.service'
|
|
|
|
notify: service handler
|
2019-05-16 16:56:06 +08:00
|
|
|
|
|
|
|
- name: start prometheus services
|
|
|
|
systemd:
|
|
|
|
name: "{{ item }}"
|
|
|
|
daemon_reload: true
|
|
|
|
enabled: true
|
|
|
|
state: started
|
|
|
|
with_items:
|
|
|
|
- prometheus
|
|
|
|
- alertmanager
|