Clean up errors

Signed-off-by: Noah Knegt <git@noahknegt.com>
This commit is contained in:
2024-04-11 19:47:38 +02:00
parent a65d96c984
commit 708f0a59f8
2 changed files with 14 additions and 14 deletions

View File

@@ -24,12 +24,11 @@ pis:
ansible_host: 192.168.90.3
ansible_user: ansible
equinox-servers:
localhost:
hosts:
apollo:
ansible_host: 23.97.157.206
ansible_port: 2004
localhost:
ansible_user: ansible
ansible_host: 127.0.0.1
all:
children:
@@ -39,6 +38,4 @@ all:
datacenter:
children:
vpses:
equinox:
children:
equinox-servers:
localhost:

View File

@@ -8,13 +8,15 @@
# ===================================================================================================
---
- hosts: datacenter
- name: Setup
hosts: datacenter
remote_user: root
roles:
- role: setup
when: setup is defined
- hosts: datacenter
- name: Install tools
hosts: datacenter
remote_user: ansible
roles:
- role: docker
@@ -23,18 +25,19 @@
- role: corepack
# Clean up the system
- hosts: datacenter
- name: Cleanup
hosts: datacenter
remote_user: ansible
become: true
tasks:
- name: cleanup package cache (debian and ubuntu)
apt:
- name: Cleanup package cache (debian and ubuntu)
ansible.builtin.apt:
autoclean: true
changed_when: false
when: ansible_os_family == "Debian"
- name: autoremove packages (debian and ubuntu)
apt:
- name: Autoremove packages (debian and ubuntu)
ansible.builtin.apt:
autoremove: true
purge: true
when: ansible_os_family == "Debian"