X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fmotd%2Fmanifests%2Finit.pp;h=d8fba15db3a56bd3de061e5cd36a366c89bd5b47;hb=4eacb834d9a191b221d0d021c7153f0bbce41c7f;hp=3a2b697de78c7a0a8b448f4923c0cabd9c2d41a3;hpb=1e389ee5fd9f5aa32e2e8d2983d95ff2a9b4c3c6;p=mirror%2Fdsa-puppet.git diff --git a/modules/motd/manifests/init.pp b/modules/motd/manifests/init.pp index 3a2b697de..d8fba15db 100644 --- a/modules/motd/manifests/init.pp +++ b/modules/motd/manifests/init.pp @@ -7,10 +7,6 @@ # include motd # class motd { - file { '/etc/update-motd.d': - ensure => directory, - mode => '0755' - } file { '/etc/motd.tail': ensure => absent, } @@ -20,21 +16,22 @@ class motd { ensure => link, target => '/var/run/motd' } + file { '/etc/update-motd.d': + ensure => directory, + mode => '0755' + } + file { '/etc/update-motd.d/puppet-motd': + notify => undef, + mode => '0555', + content => template('motd/motd.erb') + } } else { + file { '/etc/update-motd.d/puppet-motd': + ensure => absent, + } file { '/etc/motd': - ensure => link, - target => '/run/motd.dynamic' + notify => undef, + content => template('motd/motd.erb') } } - - file { '/etc/update-motd.d/puppet-motd': - notify => undef, - mode => '0555', - content => template('motd/motd.erb') - } - - exec { 'updatemotd': - command => 'uname -snrvm > /var/run/motd && cat /etc/motd.tail >> /var/run/motd', - refreshonly => true, - } }