From 066c8703899de3812c921e528221e49d45516658 Mon Sep 17 00:00:00 2001 From: pgrondek Date: Mon, 25 May 2020 00:36:09 +0200 Subject: [PATCH] Add cleanup playbook for ubuntu hosts --- server/cleanup.yml | 20 ++++++++++++++++++++ server/etc/default/motd-news | 19 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 server/cleanup.yml create mode 100644 server/etc/default/motd-news diff --git a/server/cleanup.yml b/server/cleanup.yml new file mode 100644 index 0000000..f410b1b --- /dev/null +++ b/server/cleanup.yml @@ -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 diff --git a/server/etc/default/motd-news b/server/etc/default/motd-news new file mode 100644 index 0000000..eefe29c --- /dev/null +++ b/server/etc/default/motd-news @@ -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