13 lines
529 B
YAML
13 lines
529 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: configure systemd service
|
|
template: src=backup.service dest=/etc/systemd/system/backup.service mode=0644
|
|
- name: configure systemd timer
|
|
template: src=backup.timer dest=/etc/systemd/system/backup.timer mode=0644
|
|
notify: restart backup timer
|
|
- name: enable timer
|
|
systemd: name=backup.timer state=started enabled=yes daemon_reload=yes
|