2020-12-24 09:06:20 -06:00
|
|
|
#!/usr/bin/env ansible-playbook
|
|
|
|
# vim:ft=ansible:
|
|
|
|
---
|
|
|
|
- name: template out backup script
|
|
|
|
template: src={{ backup_script }}.sh dest=/opt/backup.sh mode=0700 owner=root group=root
|
2022-05-23 01:48:13 -05:00
|
|
|
- name: template out restore script
|
|
|
|
template: src={{ restore_script }}.sh dest=/opt/restore.sh mode=0700 owner=root group=root
|
2021-01-16 23:23:07 -06:00
|
|
|
- name: configure systemd service
|
2021-07-01 12:12:06 -05:00
|
|
|
template: src=backup.service dest=/etc/systemd/system/backup.service mode=0644
|
2021-01-16 23:23:07 -06:00
|
|
|
- name: configure systemd timer
|
2021-07-01 12:12:06 -05:00
|
|
|
template: src=backup.timer dest=/etc/systemd/system/backup.timer mode=0644
|
2020-12-24 09:06:20 -06:00
|
|
|
notify: restart backup timer
|
2021-01-16 23:23:07 -06:00
|
|
|
- name: enable timer
|
2020-12-24 09:06:20 -06:00
|
|
|
systemd: name=backup.timer state=started enabled=yes daemon_reload=yes
|