base: Move base playbook

Signed-off-by: Noah Knegt <git@noahknegt.com>
This commit is contained in:
2023-02-27 16:59:53 +01:00
parent 3395acc90f
commit 9089ffbc9a

30
base.yml Normal file
View File

@@ -0,0 +1,30 @@
#===================================================================================================
# ? ABOUT
# @author : Noah Knegt
# @email : personal@noahknegt.com
# @repo : https://git.noahknegt.com/noah.knegt/ansible-automations
# @createdOn : 27-02-2023
# @description : This will apply the base configuration to the list of machines.
#===================================================================================================
---
- hosts: localhost
become: true
roles:
- base
# Clean up the system
- hosts: localhost
become: true
tasks:
- name: cleanup package cache (debian and ubuntu)
apt:
autoclean: yes
changed_when: false
when: ansible_os_family == "Debian"
- name: autoremove packages (debian and ubuntu)
apt:
autoremove: yes
purge: yes
when: ansible_os_family == "Debian"