From 2cde21dcb94b111cbce0bb63f2d664a1c34f0c2a Mon Sep 17 00:00:00 2001 From: vincent Date: Mon, 15 Apr 2019 20:14:02 +0200 Subject: [PATCH] add upgrade system to bootstrap --- tasks/main.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index a5eba89..459e4d5 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -4,6 +4,21 @@ - name: "install python and archlinux-keyring" raw: pacman -Sy python archlinux-keyring --noconfirm +- name: upgrade system + pacman: + state: latest # not required. choices: absent;latest;present. Desired state of the package. + upgrade: true # not required. Whether or not to upgrade whole system. + force: true # not required. When removing package - force remove package, without any checks. When update_cache - force redownload repo databases. + update_cache: true + become: yes + register: upgrade + +- name: Reboot updates to apply + reboot: + reboot_timeout: 3600 + when: upgrade.changed and "linux" in upgrade.packages + become: yes + - name: sudoers install pacman: state: present # not required. choices: absent;latest;present. Desired state of the package.