So I'm teaching myself puppet and am using this guide below as a start to putting a module in place.
http://littlebloghome.blogspot.com/2012/04/display-welcome-message-with-puppet.html
It sets the MOTD to the hostname in ascii text format.
It looks like i need to install "figlet" to make it work.
I know i can just go to the client and "yum install figlet", but i'd like to figure out how to let puppet handle that part also.
I tried below, but with no success. Running "puppet agent -t" give me an error that it doesn't know what "figlet" is.
class motd {
$ascii = generate('/bin/sh', '-c', "/usr/bin/figlet -c -w 60 ${hostname}")
file { 'motd':
name => '/etc/motd',
mode => '0664',
owner => 'root',
group => 'root',
require => Package['figlet'],
content => template('motd/motd.erb')
}
}
How can I make puppet install packages prior to running modules? That way the module and the client know the package/command and run?
Thanks in advance. Its probably easy, but I've yet to find it.
↧