1
0
mirror of https://github.com/Adam-Ant/puppet-motd synced 2025-06-23 01:40:55 +00:00

Initial Commit

This commit is contained in:
Adam Dodman
2018-02-20 20:58:41 +00:00
commit 56b3923c99
9 changed files with 133 additions and 0 deletions

31
manifests/init.pp Normal file
View File

@ -0,0 +1,31 @@
# Class: motd
# ===========================
#
# Install a standardized motd across all your nodes.
#
#
# Examples
# --------
#
# @example
# include ::motd
#
# Authors
# -------
#
# Adam Dodman <hello@adam-ant.co.uk>
#
# Copyright
# ---------
#
# Copyright 2018 Adam Dodman, unless otherwise noted.
#
class motd {
$motd_hash = {
'ascii' => generate('/bin/sh', '-c', "/usr/bin/figlet -cw 60 ${$facts['networking']['hostname']}"),
}
file { '/etc/motd':
content => epp('motd/motd.epp', $motd_hash),
}
}

19
manifests/install.pp Normal file
View File

@ -0,0 +1,19 @@
# This manifest is used to install figlet, required by the motd package.
# It should only be required on the puppet master.
class motd::install {
if $facts['os']['family'] == 'Redhat' {
include repoforge
package { 'figlet':
ensure => present,
require => Yumrepo['rpmforge'],
}
}
else {
package { 'figlet':
ensure => present,
}
}
}