Add cleanup playbook for ubuntu hosts

This commit is contained in:
pgrondek 2020-05-25 00:36:09 +02:00
parent 158734c208
commit 066c870389
2 changed files with 39 additions and 0 deletions

20
server/cleanup.yml Normal file
View File

@ -0,0 +1,20 @@
---
- name: cleanup ubuntu
hosts: server
become_method: sudo
become_user: root
become: yes
tasks:
- name: clean packages
apt:
pkg:
- snapd
- cloud-init
- lxd
- lxd-client
state: absent
- name: disable ubuntu ads
copy:
src: etc/default/motd-news
dest: /etc/default/motd-news

View File

@ -0,0 +1,19 @@
# Enable/disable the dynamic MOTD news service
# This is a useful way to provide dynamic, informative
# information pertinent to the users and administrators
# of the local system
ENABLED=0
# Configure the source of dynamic MOTD news
# White space separated list of 0 to many news services
# For security reasons, these must be https
# and have a valid certificate
# Canonical runs a service at motd.ubuntu.com, and you
# can easily run one too
URLS="https://motd.ubuntu.com"
# Specify the time in seconds, you're willing to wait for
# dynamic MOTD news
# Note that news messages are fetched in the background by
# a systemd timer, so this should never block boot or login
WAIT=5