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
|
enabled: true
|
||||||
daemon-reload: 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
|
- name: restart user ssh-agent
|
||||||
systemd:
|
systemd:
|
||||||
name: ssh-agent
|
name: ssh-agent
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,14 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0600"
|
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
|
- name: copy pacman configuration
|
||||||
become: yes
|
become: yes
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,5 @@
|
||||||
become: yes
|
become: yes
|
||||||
file:
|
file:
|
||||||
src: "/usr/lib/systemd/system/reflector.service"
|
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
|
state: link
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
# Wants=daily.target
|
# Wants=daily.target
|
||||||
#
|
#
|
||||||
# Or symlink the unit file to the daily.target.wants directory manually
|
# Or symlink the unit file to the daily.target.wants directory manually
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Daily timer target
|
Description=Daily timer target
|
||||||
Requires=multi-user.target
|
Requires=multi-user.target
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||||
#
|
#
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Timer which runs all services on a daily basis inside the daily.target.wants directory
|
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 }}
|
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||||
#
|
#
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Timer which runs all services on a weekly basis inside the weekly.target.wants directory
|
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