From a2427a856fba567b56a75503dbde03bd034f1349 Mon Sep 17 00:00:00 2001 From: packetcat Date: Sat, 22 Apr 2023 19:20:06 -0400 Subject: [PATCH] remove packages before installing --- ubuntu/roles/common/tasks/main.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/ubuntu/roles/common/tasks/main.yml b/ubuntu/roles/common/tasks/main.yml index 0e215ab..c1ebae3 100644 --- a/ubuntu/roles/common/tasks/main.yml +++ b/ubuntu/roles/common/tasks/main.yml @@ -24,6 +24,18 @@ hostname: name: "{{ inventory_hostname }}" use: systemd +- name: Remove packages we do not need + apt: + name: "{{ packages }}" + state: absent + vars: + packages: + - exim4-daemon-light + - consolekit + - snapd + - lxcfs + - rpcbind + - ufw - name: Install required packages apt: name: "{{ packages }}" @@ -54,17 +66,6 @@ - postfix - python-is-python3 - net-tools -- name: Remove packages we do not need - apt: - name: "{{ packages }}" - state: absent - vars: - packages: - - exim4-daemon-light - - consolekit - - snapd - - lxcfs - - rpcbind - name: Ensure haveged, ntp, and vnstat are started on boot service: name={{ item }} enabled=yes with_items: