On Thu, 2010-10-14 at 23:47 +1300, Michal Ludvig wrote: > Hi guys, > > I'm installing Puppet on RHEL5 systems using KickStart but struggle with > the first boot.
As Stephen says, use cobbler (we do as well!) and put it into your kickstart. Here's ours: ================== sample.ks ================= #platform=x86, AMD64, or Intel EM64T # System authorization information auth --useshadow --enablemd5 # System bootloader configuration bootloader --location=mbr # Partition clearing information clearpart --all --initlabel # Use text mode install text # Firewall configuration - switch this off as we will apply it using # puppet firewall --disabled # Run the Setup Agent on first boot firstboot --disable # System keyboard keyboard uk # System language lang en_GB # Use network installation url --url=$tree # If any cobbler repo definitions were referenced in the kickstart # profile, include them here. $yum_repo_stanza # Network information $SNIPPET('network_config') # Reboot after installation reboot #Root password rootpw --iscrypted $default_password_crypted # SELinux configuration selinux --disabled # Do not configure the X Window System skipx # System timezone timezone Europe/London # Install OS instead of upgrade install # Clear the Master Boot Record zerombr # setup the default patitioning part /boot --fstype=ext3 --size=256 part swap --size=2048 part pv.01 --size=1 --grow volgroup vg_root pv.01 logvol / --vgname=vg_root --size=8192 --name=lv_root logvol /var --vgname=vg_root --size=10240 --name=lv_var logvol /tmp --vgname=vg_root --size=10240 --name=lv_tmp logvol /home --vgname=vg_root --size=10240 --name=lv_home %pre $SNIPPET('log_ks_pre') $kickstart_start $SNIPPET('pre_install_network_config') # Enable installation monitoring $SNIPPET('pre_anamon') %packages $SNIPPET('func_install_if_enabled') @Base vim-enhanced puppet acpid -sendmail %post --nochroot # THIS IS THE PUPPET STUFF! # # It registers the puppet client with the server and then it will # run on firstboot # Copy netinfo, which has our FQDN from DHCP, into the chroot test -f /tmp/netinfo && cp /tmp/netinfo /mnt/sysimage/tmp/ %post /sbin/chkconfig --level 345 puppet on # Figure out the FQDN if [ -f /tmp/netinfo ] ; then FQDN=`(source /tmp/netinfo; [ -n "$DOMAIN" ] && echo $HOSTNAME.$DOMAIN || echo $HOSTNAME)` # Run puppet, just to get the certs; the actual config update happens # on the next reboot hostname $FQDN /usr/sbin/puppetd -o -v --tag no_such_tag --waitforcert 60 fi $SNIPPET('log_ks_post') # Start yum configuration $yum_config_stanza # End yum configuration $SNIPPET('post_install_kernel_options') $SNIPPET('post_install_network_config') $SNIPPET('func_register_if_enabled') $SNIPPET('download_config_files') $SNIPPET('koan_environment') $SNIPPET('redhat_register') $SNIPPET('cobbler_register') # Enable post-install boot notification $SNIPPET('post_anamon') # Start final steps $kickstart_done # End final steps ========== END Sample.ks ================= All the $SNIPPET stuff is cobbler specific, but the Puppet config stuff should work as part of any kickstart. HTH, Matt. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.