puppet: Switch removal of MOTD directories for .hushlogin.

Rather than have to keep resolving apt conflicts with the lack of
`/etc/update-motd.d`, have each user disable the motds with a
`.hushlogin` file.
This commit is contained in:
Alex Vandiver 2024-01-30 23:23:02 -05:00 committed by Tim Abbott
parent 1bddf41731
commit 65d2e855a0
2 changed files with 12 additions and 9 deletions

View File

@ -65,15 +65,6 @@ class zulip_ops::profile::base {
zulip_ops::user_dotfiles { 'zulip': }
# Clear /etc/update-motd.d, to fix load problems with Nagios
# caused by Ubuntu's default MOTD tools for things like "checking
# for the next release" being super slow.
file { '/etc/update-motd.d':
ensure => directory,
recurse => true,
purge => true,
}
file { '/etc/pam.d/common-session':
ensure => file,
require => Package['openssh-server'],

View File

@ -25,4 +25,16 @@ define zulip_ops::user_dotfiles (
mode => '0644',
source => 'puppet:///modules/zulip_ops/dotfiles/emacs.el',
}
# Suppress MOTD printing, to fix load problems with Nagios caused by
# Ubuntu's default MOTD tools for things like "checking for the next
# release" being super slow.
file { "${homedir}/.hushlogin":
ensure => file,
require => User[$user],
owner => $user,
group => $user,
mode => '0644',
content => '',
}
}