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"
|
when: ansible_os_family != "Gentoo"
|
||||||
- name: configure systemd service
|
- name: configure systemd service
|
||||||
template: src=ansible-pull.service dest=/etc/systemd/system/ansible-pull.service
|
template: src=ansible-pull.service dest=/etc/systemd/system/ansible-pull.service
|
||||||
notify: restart ansiblepull timer
|
|
||||||
- name: configure systemd timer
|
- name: configure systemd timer
|
||||||
template: src=ansible-pull.timer dest=/etc/systemd/system/ansible-pull.timer
|
template: src=ansible-pull.timer dest=/etc/systemd/system/ansible-pull.timer
|
||||||
notify: restart ansiblepull timer
|
notify: restart ansiblepull timer
|
||||||
- name: enable timer
|
- name: enable timer
|
||||||
systemd: daemon_reload=yes name=ansible-pull.timer enabled=yes state=started
|
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
|
- name: template out backup script
|
||||||
template: src={{ backup_script }}.sh dest=/opt/backup.sh mode=0700 owner=root group=root
|
template: src={{ backup_script }}.sh dest=/opt/backup.sh mode=0700 owner=root group=root
|
||||||
- name: assure systemd unit and timer
|
- name: configure systemd service
|
||||||
template: src=backup.{{ item }} dest=/etc/systemd/system/backup.{{ item }}
|
template: src=backup.service dest=/etc/systemd/system/backup.service
|
||||||
loop:
|
- name: configure systemd timer
|
||||||
- service
|
template: src=backup.service dest=/etc/systemd/system/backup.timer
|
||||||
- timer
|
|
||||||
notify: restart backup timer
|
notify: restart backup timer
|
||||||
- name: enable systemd timer
|
- name: enable timer
|
||||||
systemd: name=backup.timer state=started enabled=yes daemon_reload=yes
|
systemd: name=backup.timer state=started enabled=yes daemon_reload=yes
|
||||||
|
Loading…
Reference in New Issue
Block a user