diff --git a/roles/ansible-pull/tasks/main.yml b/roles/ansible-pull/tasks/main.yml index e0bc09d..a39183a 100644 --- a/roles/ansible-pull/tasks/main.yml +++ b/roles/ansible-pull/tasks/main.yml @@ -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 diff --git a/roles/backup/tasks/main.yml b/roles/backup/tasks/main.yml index 7693e09..4a7c9a8 100644 --- a/roles/backup/tasks/main.yml +++ b/roles/backup/tasks/main.yml @@ -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