Hi,
I''m new to puppet and having difficultly setting it up the way I want
to
(which is a little different from the norm I''d say).
What I''m trying to achieve is to have a automatic build of debian (etch
at
the moment) using debian installer that installs a minimal system including
puppet using the debian package puppet (not puppetmaster). As part of the
initial setup the puppet config is configured (again using debian installer)
so that the manifest and facts repositories point to a cd hard copy
(actually a usb key at the moment while I develop the final soluation). The
debain installer stage works fine, however, the puppet configuration
doesn''t
seem to be working.
Once the raw system has booted for the first time (just after the debain
installer install stage) it will have the hostname ''
unknownhost.unknowndomain''. Within the site.pp the node definition for
''
unknownhost.unknowndomain'' will then use the machines mac address to
determine things such as it''s real hostname, domainname, required
packages
etc. Once puppet has applied the new configuration the machine will be
automatically rebooted with the real configuration and then puppet will
refresh the machines config every 5 mins using the manifests on the cd.
My idea of using the manifests stored on a cd is primarily for security
reasons (as the machines will be internet visible), it also enforces me to
use version release control procedures which is a good thing!.
Can puppet work like this as puppetd keeps on complaining about certificates
etc. as it can''t find the server puppet.
If so, what should my puppet configs look like? I''ve attached my basic
site.pp to hopefully give you a better idea of the puppet stages once puppet
is configured correctly.
site.pp:
import "classes/*"
# do preconfiguration work just after build
node ''unknownhost.unknowndomain'' {
case $macaddress {
''00:20:43:db:f4:1a'' : {
$host = "svrA"
$domain = "mydomain.com"
}
default : { err ( "Undefined macaddress value:
''$macaddress''" ) }
}
# this should be a class but for now (until it is working) lets keep it
simple
file { "hostname":
path => $operatingsystem ? {
default => "/etc/hostname"
},
content => "$host.$domain",
replace => yes,
owner => root,
group => root,
mode => 644
}
# include hostname
# update apt configuration
# update apt cache
# change lvm names
# install wifi drivers
# configure wifi network
# install xen
# configure xen
include rebootnow
}
# now setup the real server
node ''svrA.mydomain.com'' {
# do some more ''real'' stuff here
}
Any help and advice appreciated.
Regards,
Andrew
_______________________________________________
Puppet-users mailing list
Puppet-users@madstop.com
https://mail.madstop.com/mailman/listinfo/puppet-users