ansible/roles/backup/tasks/main.yml
Salt 00fb2bb32e Work on a basic implementation of backups
Still need to set up good defaults and do host-based configuration tho
2020-12-24 09:06:20 -06:00

14 lines
462 B
YAML

#!/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
- name: assure systemd unit and timer
template: src=backup.{{ item }} dest=/etc/systemd/system/backup.{{ item }}
loop:
- service
- timer
notify: restart backup timer
- name: enable systemd timer
systemd: name=backup.timer state=started enabled=yes daemon_reload=yes