mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-12 00:03:17 +02:00
34 lines
728 B
YAML
34 lines
728 B
YAML
---
|
|
|
|
- name: Deploy systemd service unit
|
|
template: src=consul.service.j2 dest=/etc/systemd/system/consul.service
|
|
register: consul_unit
|
|
notify: restart consul
|
|
tags: consul
|
|
|
|
- name: Install backup hooks
|
|
template: src={{ item }}-backup.j2 dest=/etc/backup/{{ item }}.d/consul mode=755
|
|
loop:
|
|
- pre
|
|
- post
|
|
tags: consul
|
|
|
|
- name: Create tmpfiles fragment
|
|
copy:
|
|
content: |
|
|
d /run/consul 770 root {{ consul_user }}
|
|
dest: /etc/tmpfiles.d/consul.conf
|
|
register: consul_tmpfiles
|
|
tags: consul
|
|
|
|
- name: Create tmpfiles
|
|
command: systemd-tmpfiles --create
|
|
when: consul_tmpfiles.changed
|
|
tags: consul
|
|
|
|
- name: Reload systemd
|
|
systemd: daemon_reload=True
|
|
when: consul_unit.changed
|
|
tags: consul
|
|
|