Switching to variables for debian update timers

This commit is contained in:
Tyler Hale 2022-08-22 14:14:56 -06:00
parent 53804e6cf1
commit 65c015112d
Signed by: Tyler
GPG key ID: C7CC4B910D88EF96
4 changed files with 21 additions and 5 deletions

View file

@ -71,6 +71,22 @@ base_core_root_ca_url: ""
# Enables the installation of the cockpit web management package(s)
base_core_web_management: false
# ******
# Debian
# ******
# Automatic Updates
# =============
# commands
# --------
base_debian_automatic_updates_download: "02:00"
base_debian_automatic_updates_download_randomizer: "5m"
base_debian_automatic_updates_update: "02:15"
base_debian_automatic_updates_update_randomizer: "5m"
base_debian_automatic_updates_reboot: "03:30"
# ******
# RedHat
# ******

View file

@ -29,7 +29,7 @@
lineinfile:
path: /etc/apt/apt.conf.d/50unattended-upgrades
regexp: '^\/?\/?Unattended-Upgrade::Automatic-Reboot-Time '
line: 'Unattended-Upgrade::Automatic-Reboot-Time "03:30";'
line: "Unattended-Upgrade::Automatic-Reboot-Time \"{{ base_debian_automatic_updates_reboot }}\";"
- name: Ensure directory exists for daily download timer
file:

View file

@ -1,4 +1,4 @@
[Timer]
OnCalendar=
OnCalendar=02:15
RandomizedDelaySec=0
OnCalendar={{ base_debian_automatic_updates_update }}
RandomizedDelaySec={{ base_debian_automatic_updates_update_randomizer }}

View file

@ -1,4 +1,4 @@
[Timer]
OnCalendar=
OnCalendar=02:00
RandomizedDelaySec=0
OnCalendar={{ base_debian_automatic_updates_download }}
RandomizedDelaySec={{ base_debian_automatic_updates_download_randomizer }}