Move handler to tasks
Disabling reflector as handler afterwards removes the changes done earlier
This commit is contained in:
parent
c966d6f99d
commit
24d69ee598
6 changed files with 12 additions and 11 deletions
|
|
@ -14,14 +14,6 @@
|
|||
enabled: true
|
||||
daemon-reload: true
|
||||
|
||||
# started by weekly timer
|
||||
- name: disable reflector
|
||||
become: true
|
||||
systemd:
|
||||
name: reflector
|
||||
state: stopped
|
||||
enabled: false
|
||||
|
||||
- name: restart user ssh-agent
|
||||
systemd:
|
||||
name: ssh-agent
|
||||
|
|
|
|||
|
|
@ -22,7 +22,14 @@
|
|||
owner: root
|
||||
group: root
|
||||
mode: "0600"
|
||||
notify: disable reflector
|
||||
|
||||
# started by weekly timer
|
||||
- name: disable reflector
|
||||
become: true
|
||||
systemd:
|
||||
name: reflector
|
||||
state: stopped
|
||||
enabled: false
|
||||
|
||||
- name: copy pacman configuration
|
||||
become: yes
|
||||
|
|
|
|||
|
|
@ -50,6 +50,5 @@
|
|||
become: yes
|
||||
file:
|
||||
src: "/usr/lib/systemd/system/reflector.service"
|
||||
path: "/etc/systemd/system/weekly.target.wants/reflector.service"
|
||||
dest: "/etc/systemd/system/weekly.target.wants/reflector.service"
|
||||
state: link
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
# Wants=daily.target
|
||||
#
|
||||
# Or symlink the unit file to the daily.target.wants directory manually
|
||||
|
||||
[Unit]
|
||||
Description=Daily timer target
|
||||
Requires=multi-user.target
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Timer which runs all services on a daily basis inside the daily.target.wants directory
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Timer which runs all services on a weekly basis inside the weekly.target.wants directory
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue