remove packages before installing

This commit is contained in:
packetcat 2023-04-22 19:20:06 -04:00
parent 634ccb19b6
commit a2427a856f
1 changed files with 12 additions and 11 deletions

View File

@ -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: