Hello. Hope you can help me further. I can vaguely remember that once I saw a reference how to preconfigure debconf in puppet manifests. So you can define answers in debconf inside of manifests. No idea where anymore. Anybody knows? greetinx Christo
On Tue, Oct 03, 2006 at 05:13:43PM +0200, Christo Buschek wrote:> Hello. > > Hope you can help me further. > > I can vaguely remember that once I saw a reference how to preconfigure > debconf in puppet manifests. So you can define answers in debconf inside > of manifests. No idea where anymore. Anybody knows?I''ve defined a trivial component which will fetch a preseed file from a puppet fileserver, and then feeds it to debconf. define preseed () { $preseed_file = "/var/cache/preseed/$name" file { $preseed_file: pathname => "preseed/$name" } exec { "/usr/bin/debconf-set-selections < $preseed_file": # onlyif => "/bin/false", require => file[$preseed_file], subscribe => file[$preseed_file] } } Where remotefile is just a wrapper around file{} to fetch the file from a server, which is defaulted. I suppose that one possible improvement here would be to have the answers directly embedded in the configuration file, so you could use variable interpolation, &c. -- Ceri Storey <cez@necrofish.org.uk> ''What I really want is "apt-get smite"'' --Rob Partington <http://rjp.frottage.org>
Ceri Storey wrote:> define preseed () { > $preseed_file = "/var/cache/preseed/$name" > file { $preseed_file: > pathname => "preseed/$name" > } > > exec { "/usr/bin/debconf-set-selections < $preseed_file": > # onlyif => "/bin/false", > require => file[$preseed_file], subscribe => file[$preseed_file] > } > }Just so you know, subscribe is a superset of require, so just having ''subscribe'' here is sufficient. -- Patriotism is often an arbitrary veneration of real estate above principles. -- George Jean Nathan --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
On Wed, Oct 04, 2006 at 01:54:56PM -0500, Luke Kanies wrote:> Just so you know, subscribe is a superset of require, so just having > ''subscribe'' here is sufficient.Next thing I know you''ll be telling me that shells have builtin I/O redirection facilities, so that I don''t have to use cat / dd all of the time. :) Thanks. -- Ceri Storey <cez@necrofish.org.uk> ''What I really want is "apt-get smite"'' --Rob Partington <http://rjp.frottage.org>