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