






















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to Puppet, a popular configuration management system and programming language. It covers the basics of Puppet, its architecture, and the tools required for its implementation. The document also explains the Puppet process, including registration, provisioning, and configuration, and provides examples of resources, manifests, and classes. It is a valuable resource for university students and IT professionals seeking to understand and use Puppet for managing IT infrastructure.
Typology: Lecture notes
1 / 30
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' ] , } }