From 0a0f529090f808a63e2193096681025d4c1c311d Mon Sep 17 00:00:00 2001 From: Andrii Babarytskyi Date: Mon, 27 Jun 2022 14:04:54 +0200 Subject: [PATCH] Added unattended-upgrade as role --- meta/main.yml | 10 ++++++++-- tasks/ubuntu2004.yml | 11 ++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index 8f87df5..0e7f5c8 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,12 +1,18 @@ --- +dependencies: + - name: unattended_upgrades + scm: git + src: git@gitlab.epfl.ch:ansible-sti-roles/ansible-unattended-upgrades.git + + galaxy_info: author: Dimitri Colier description: Install basics tools/packages for sticluster servers company: EPFL - + license: MIT issue_tracker_url: https://support.epfl.ch - min_ansible_version: 2.9 + min_ansible_version: "2.9" platforms: - name: Ubuntu diff --git a/tasks/ubuntu2004.yml b/tasks/ubuntu2004.yml index 9cec4c7..2065889 100644 --- a/tasks/ubuntu2004.yml +++ b/tasks/ubuntu2004.yml @@ -1,13 +1,13 @@ --- # tasks file for basics - name: update & upgrade ubuntu - become: yes + become: true package: update_cache: yes upgrade: yes - name: install basic tools via apt - become: yes + become: true apt: state: latest pkg: @@ -38,8 +38,13 @@ - gnupg1 - gnupg2 +- name: install unattended_upgrades + become: true + ansible.builtin.import_role: + name: unattended_upgrades + - name: grub setup from template - become: yes + become: true template: src: grub.j2 dest: "/etc/default/grub" -- GitLab