






















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!























What is Puppet
Puppet process - Step 1
Example: foreman, satellite, spacewalk ... Creates: Kickstart File and Puppet Node definition
Puppet process - Step 2
Tool: Redhat anaconda, Ubuntu Fai, cobbler, preseed Input: anaconda configured by kickstart file preseed config file … Result: Installing minimal linux and puppet, and start Puppet after reboot
Contents
Resources
Example Resource
Ressource shell
Resource basic
Manifests
Manifests Run
actual status defined status
Puppet Action
/etc/service.conf
/etc/init.d/service: not running /etc/init.d/service: running
write file
start service
no file /etc/service.conf /etc/service.conf
start service
Manifests example!
file {'/tmp/test1': ensure => present, content => "Hi.", }
file {'/tmp/test2': ensure => directory, mode => 0644, }
file {'/tmp/test3': ensure => link, target => '/tmp/test1', }
notify {"I'm notifying you.":} notify {"So am I!":}
Facts example!
host {'self': ensure => present, name => $fqdn, host_aliases => [ 'puppet', $hostname ] , ip => $ipaddress, }
file {'motd': ensure => file, path => '/etc/motd', mode => 0644, content => "Welcome to ${hostname},\na ${operatingsystem} island in the sea of ${domain}.\n", }
Conditionals a first example!
if $is_virtual == 'true' { service {'ntpd': ensure => stopped, enable => false , } } else { service { 'ntpd': name => 'ntpd', ensure => running, enable => true , hasrestart => true , require => Package [ 'ntp' ] , } }