From cec6b008559440187fe77ab059ad7fdd8a7993a2 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Wed, 24 Jun 2020 14:23:56 +0100 Subject: [PATCH 1/1] Ubuntu MOTD adverts-be-gone --- cookbooks/tools/recipes/default.rb | 8 +++++++ .../tools/templates/default/motd-news.erb | 21 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 cookbooks/tools/templates/default/motd-news.erb diff --git a/cookbooks/tools/recipes/default.rb b/cookbooks/tools/recipes/default.rb index b5e12de2c..72df47773 100644 --- a/cookbooks/tools/recipes/default.rb +++ b/cookbooks/tools/recipes/default.rb @@ -74,3 +74,11 @@ end service "cron" do action [:enable, :start] end + +# Ubuntu MOTD adverts be-gone +template "/etc/default/motd-news" do + source "motd-news.erb" + owner "root" + group "root" + mode 0o644 +end diff --git a/cookbooks/tools/templates/default/motd-news.erb b/cookbooks/tools/templates/default/motd-news.erb new file mode 100644 index 000000000..ac0f13ab3 --- /dev/null +++ b/cookbooks/tools/templates/default/motd-news.erb @@ -0,0 +1,21 @@ +# DO NOT EDIT - This file is being maintained by Chef + +# 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 -- 2.39.5