run dnf-automatic only on Mon-Fri
This commit is contained in:
parent
4ee1e5238f
commit
7c81f6d81b
2 changed files with 16 additions and 0 deletions
6
roles/dnf-automatic/handlers/main.yml
Normal file
6
roles/dnf-automatic/handlers/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- name: Restart dnf-automatic.timer
|
||||||
|
systemd:
|
||||||
|
name: dnf-automatic.timer
|
||||||
|
state: restarted
|
||||||
|
daemon_reload: yes
|
|
@ -30,6 +30,16 @@
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
|
||||||
|
- name: Set dnf-automatic to execute only on Mon-Fri
|
||||||
|
ini_file:
|
||||||
|
path: /usr/lib/systemd/system/dnf-automatic.timer
|
||||||
|
section: Timer
|
||||||
|
option: OnCalendar
|
||||||
|
value: Mon..Fri *-*-* 6:00:00
|
||||||
|
notify: Restart dnf-automatic.timer
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
|
||||||
- name: check if dnf-automatic.timer is active
|
- name: check if dnf-automatic.timer is active
|
||||||
command: systemctl is-active dnf-automatic.timer
|
command: systemctl is-active dnf-automatic.timer
|
||||||
register: automaticative
|
register: automaticative
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue