37 lines
868 B
YAML
37 lines
868 B
YAML
---
|
|
- name: Adding services to send status emails
|
|
template:
|
|
src: etc/systemd/system/{{ item }}@.service.j2
|
|
dst: /etc/systemd/system/{{ item }}@.service
|
|
owner: root
|
|
group: root
|
|
loop:
|
|
- successmail
|
|
- failuremail
|
|
|
|
- name: Deploy the status-sender
|
|
template:
|
|
src: var/local/sendstatusmail.sh.j2
|
|
dst: /var/local/sendstatusmail.sh
|
|
owner: root
|
|
group: root
|
|
mode: '0500'
|
|
|
|
- name: Install sdcron timers
|
|
template:
|
|
src: etc/systemd/system/sdcron.timer.j2
|
|
dst: etc/systemd/system/{{ item.name }}.timer
|
|
loop: "{{ sdcron.tasks }}"
|
|
|
|
- name: Install sdcron services
|
|
template:
|
|
src: etc/systemd/system/sdcron.service.j2
|
|
dst: etc/systemd/system/{{ item.name }}.service
|
|
loop: "{{ sdcron.tasks }}"
|
|
|
|
- name: Enable sdcron timers
|
|
systemd:
|
|
name: {{ item.name }}.timer
|
|
enabled: yes
|
|
loop: "{{ sdcron.tasks }}"
|