aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/apt/tasks
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-01-25 14:40:44 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2023-01-25 14:40:44 +0100
commitb02a8c40c76cb2e61c7a664ec156407101201a24 (patch)
tree0e046b783331db1bbba78bee75dbdac2e67e420a /roles/apt/tasks
parentlinting (diff)
downloadmaintenance-b02a8c40c76cb2e61c7a664ec156407101201a24.tar.gz
maintenance-b02a8c40c76cb2e61c7a664ec156407101201a24.zip
move tool existence conditionals to role common
Diffstat (limited to '')
-rw-r--r--roles/apt/tasks/main.yml37
1 files changed, 15 insertions, 22 deletions
diff --git a/roles/apt/tasks/main.yml b/roles/apt/tasks/main.yml
index f331995..d658651 100644
--- a/roles/apt/tasks/main.yml
+++ b/roles/apt/tasks/main.yml
@@ -1,26 +1,19 @@
-- name: Check if apt is installed
- command: apt-get --version
- register: apt_version
- changed_when: false
- failed_when: false
-
-- when: apt_version.rc == 0
+- name: Upgrade packages
become: true
- block:
- - name: Upgrade packages
- apt:
- update_cache: true
- upgrade: full
- notify: reboot
+ apt:
+ update_cache: true
+ upgrade: full
+ notify: reboot
- - name: Flush handlers
- meta: flush_handlers
+- name: Flush handlers
+ meta: flush_handlers
- - name: Clean up dependencies
- apt:
- autoremove: true
- purge: true
- notify: reboot
+- name: Clean up dependencies
+ become: true
+ apt:
+ autoremove: true
+ purge: true
+ notify: reboot
- - name: Flush handlers
- meta: flush_handlers
+- name: Flush handlers
+ meta: flush_handlers