preseed/late_command

739 views
Skip to first unread message

Derek Yarnell

unread,
Mar 17, 2010, 9:39:01 PM3/17/10
to Puppet Users
Hi,

Anyone running puppetd --test in their preseed late_command? I can't
seem to get it working as the installer hangs forever in the
late_preseed stage.

This is what I am using,

d-i preseed/late_command string chroot /target; mount /proc;
/usr/sbin/puppetd --test --server puppetserver.my.domain

If I run this in a virtual console it seems to work fine. Anyone doing
this or have they gone another way?

Thanks,
derek

--
--
Derek Yarnell

Ohad Levy

unread,
Mar 17, 2010, 11:16:34 PM3/17/10
to puppet...@googlegroups.com
Hi Derek,

This is how its done in Foreman:

this is the preseed template:

and this is the is the late command:

hope this helps,
Ohad


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.


Derek Yarnell

unread,
Mar 17, 2010, 7:10:20 PM3/17/10
to Puppet Users
Hi,

Anyone running puppetd --test in their preseed late_command? I can't
seem to get it working as the installer hangs forever in the
late_preseed stage.

This is what I am using,

d-i preseed/late_command string chroot /target; mount /proc;
/usr/sbin/puppetd --test --server puppetserver.my.domain

Thanks,
derek

--
---
Derek T. Yarnell
University of Maryland
Institute for Advanced Computer Studies

Eric Gerlach

unread,
Mar 18, 2010, 12:59:17 PM3/18/10
to puppet...@googlegroups.com
On Wed, Mar 17, 2010 at 07:10:20PM -0400, Derek Yarnell wrote:
> Hi,
>
> Anyone running puppetd --test in their preseed late_command? I
> can't seem to get it working as the installer hangs forever in the
> late_preseed stage.
>
> This is what I am using,
>
> d-i preseed/late_command string chroot /target; mount /proc;
> /usr/sbin/puppetd --test --server puppetserver.my.domain

What we did as a late command was the following:

d-i preseed/late_command in-target wget -O /target/etc/default/puppet http://DEPLOYMENT_SERVER/d-i/lenny/puppet.default

Which gets the following default file:

==== Begin /etc/default/puppet ====
# Defaults for puppet - sourced by /etc/init.d/puppet

# Start puppet on boot?
START=yes

cat <<HERE > /etc/puppet/puppet.conf
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=\$vardir/lib/facter
pluginsync=true
server=PUPPETMASTER
evaltrace=true
HERE

for n in `seq 1 30`; do
ping -c 1 PUPPETMASTER >& /dev/null && break
echo -n " $n"
sleep 1
done

# Startup options
DAEMON_OPTS="-w 120"
==== End /etc/default/puppet ====

Then, when the machine boots for the first time, it has enough information to
contact the puppetmaster and do a run. Since puppetd does a run when it
starts, this starts the configuration process.

Cheers,

--
Eric Gerlach, Network Administrator
Federation of Students
University of Waterloo
p: (519) 888-4567 x36329
e: eger...@feds.uwaterloo.ca
w: http://feds.ca/

"To Serve, Empower, and Represent the Undergraduate Students of the University
of Waterloo"

Reply all
Reply to author
Forward
0 new messages