15 lines
738 B
YAML
15 lines
738 B
YAML
#!/usr/bin/env ansible-playbook
|
|
# vim:ft=ansible:
|
|
---
|
|
- name: template out backup script
|
|
ansible.builtin.template: src={{ backup_script }}.sh dest=/opt/backup.sh mode=0700 owner=root group=root
|
|
- name: template out restore script
|
|
ansible.builtin.template: src={{ restore_script }}.sh dest=/opt/restore.sh mode=0700 owner=root group=root
|
|
- name: configure systemd service
|
|
ansible.builtin.template: src=backup.service dest=/etc/systemd/system/backup.service mode=0644
|
|
- name: configure systemd timer
|
|
ansible.builtin.template: src=backup.timer dest=/etc/systemd/system/backup.timer mode=0644
|
|
notify: restart backup timer
|
|
- name: enable timer
|
|
ansible.builtin.systemd: name=backup.timer state=started enabled=yes daemon_reload=yes
|