Configure unattended-upgrades

This commit is contained in:
Wojciech Kozlowski 2022-08-30 17:18:15 +02:00
parent 43eba74072
commit ee7471e6e4
2 changed files with 21 additions and 1 deletions

View File

@ -6,6 +6,26 @@
tasks: tasks:
# -------------------------------------------------------------------------
# Unattended upgrades configuration.
# -------------------------------------------------------------------------
- name: Install unattended-upgrades
apt:
name: unattended-upgrades
- name: Configure unattended-upgrades
copy:
src: ./root/etc/apt/apt.conf.d/50unattended-upgrades
dest: /etc/apt/apt.conf.d/50unattended-upgrades
mode: 0644
- name: Enable unattended-upgrades
copy:
src: ./root/etc/apt/apt.conf.d/20auto-upgrades
dest: /etc/apt/apt.conf.d/20auto-upgrades
mode: 0644
# ---------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
# SSH configuration. # SSH configuration.
# ---------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------

View File

@ -91,7 +91,7 @@ Unattended-Upgrade::Package-Blacklist {
// If empty or unset then no email is sent, make sure that you // If empty or unset then no email is sent, make sure that you
// have a working mail setup on your system. A package that provides // have a working mail setup on your system. A package that provides
// 'mailx' must be installed. E.g. "user@example.com" // 'mailx' must be installed. E.g. "user@example.com"
//Unattended-Upgrade::Mail ""; Unattended-Upgrade::Mail "root";
// Set this value to one of: // Set this value to one of:
// "always", "only-on-error" or "on-change" // "always", "only-on-error" or "on-change"