Reduce unnecessary steps in ansible-pull and backup roles
This commit is contained in:
parent
abcfaea0a5
commit
4e6c96fabd
@ -9,10 +9,8 @@
|
||||
when: ansible_os_family != "Gentoo"
|
||||
- name: configure systemd service
|
||||
template: src=ansible-pull.service dest=/etc/systemd/system/ansible-pull.service
|
||||
notify: restart ansiblepull timer
|
||||
- name: configure systemd timer
|
||||
template: src=ansible-pull.timer dest=/etc/systemd/system/ansible-pull.timer
|
||||
notify: restart ansiblepull timer
|
||||
- name: enable timer
|
||||
systemd: daemon_reload=yes name=ansible-pull.timer enabled=yes state=started
|
||||
notify: restart ansiblepull timer
|
||||
|
@ -3,11 +3,10 @@
|
||||
---
|
||||
- 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
|
||||
- name: configure systemd service
|
||||
template: src=backup.service dest=/etc/systemd/system/backup.service
|
||||
- name: configure systemd timer
|
||||
template: src=backup.service dest=/etc/systemd/system/backup.timer
|
||||
notify: restart backup timer
|
||||
- name: enable systemd timer
|
||||
- name: enable timer
|
||||
systemd: name=backup.timer state=started enabled=yes daemon_reload=yes
|
||||
|
Loading…
Reference in New Issue
Block a user