From 632a893ca58c25d3117efc6bc6126ecc0d9b0cf9 Mon Sep 17 00:00:00 2001 From: uumas Date: Thu, 27 Mar 2025 21:48:12 +0200 Subject: [PATCH] Add automatic_updates role --- roles/automatic_updates/meta/argument_specs.yaml | 8 ++++++++ roles/automatic_updates/tasks/main.yaml | 14 ++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 roles/automatic_updates/meta/argument_specs.yaml create mode 100644 roles/automatic_updates/tasks/main.yaml diff --git a/roles/automatic_updates/meta/argument_specs.yaml b/roles/automatic_updates/meta/argument_specs.yaml new file mode 100644 index 0000000..c52e7fc --- /dev/null +++ b/roles/automatic_updates/meta/argument_specs.yaml @@ -0,0 +1,8 @@ +--- +argument_specs: + main: + short_description: Automatic updates + description: + - This role enables automatic package updates. + - It currently supports Debian and Ubuntu. + options: {} diff --git a/roles/automatic_updates/tasks/main.yaml b/roles/automatic_updates/tasks/main.yaml new file mode 100644 index 0000000..fa3b2af --- /dev/null +++ b/roles/automatic_updates/tasks/main.yaml @@ -0,0 +1,14 @@ +--- +- name: Ensure host distribution is supported + ansible.builtin.import_role: + name: compatcheck + vars: + compatcheck_supported_distributions: + - name: debian + version_min: 11 + - name: ubuntu + version_min: 24 + +- name: Install unatteded-upgrades + ansible.builtin.apt: + name: unattended-upgrades