add turn-off-motd-news role

This commit is contained in:
staticsafe 2018-09-25 20:38:02 -04:00
parent eb4ca4c8fe
commit 482bbc8cf1
3 changed files with 38 additions and 0 deletions

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

View File

@ -0,0 +1,12 @@
---
# This role turns off the MOTD news in Ubuntu 18.04
- name: Copy motd-news file
when: ansible_distribution_release == 'bionic'
copy:
src: motd-news
dest: /etc/default/motd-news
owner: root
group: root
mode: 0644
backup: yes

View File

@ -36,3 +36,10 @@
- jdauphant.nginx - jdauphant.nginx
- php - php
- mysql - mysql
- name: Turn off MOTD news on Ubuntu 18.04 hosts
hosts: myubuntuservers
user: root
roles:
- turn-off-motd-news