More newbie questions from me ... How do you specify multiple requires in an exec ? What I''ve tried: define cvsserve($source, $path, $user = false) { file { $path: ensure => directory, owner => root, group => root } $cvscmd = $user ? { false => "/usr/bin/cvs export $source/$name .", default => "/usr/bin/cvs -d $user@$source checkout $name" } exec { "/bin/mkdir -p $path": creates => $path } exec { $cvscmd: cwd => $path, env => ["CVS_RSH=/usr/bin/ssh" ], require => Exec["/bin/mkdir -p $path"], require => Sshkey["foohost.usyd.edu.au"], } sshkey { "foohost.usyd.edu.au": ensure => present, key => "AAAA...<snip>...", type => "ssh-rsa" } } However the two requires in the exec there produce the following warning: err: Could not retrieve configuration: Parameter require is already set on Exec[/usr/bin/cvs -d puppet@foohost.usyd.edu.au:/cvsroot checkout barproject] by cvsserve at /etc/puppet/manifests/ functions.pp:44 Thank you Jesse Jesse Reynolds Virtual Artists Pty Ltd - va.com.au Phone: 08 8223 2288 Mobile: 0414 669 790
On Wed, Feb 14, 2007 at 05:18:36PM +1100, Jesse Reynolds wrote:> require => Exec["/bin/mkdir -p $path"], > require => Sshkey["foohost.usyd.edu.au"],Should be: require => [ Exec["/bin/mkdir -p $path"], Sshkey["foohost.usyd.edu.au"] ] This "list" syntax is quite a common one in Puppet, and you''ll use it (or see it used) in lots of places. Meanwhile, what are you doing mucking around with University of Sydney SSH keys from Adelaide? <grin> - Matt -- It fsck''s the volume or it gets the format again. -- Don Quixote, in the Monastery
On 14/02/2007, at 6:07 PM, Matthew Palmer wrote:> On Wed, Feb 14, 2007 at 05:18:36PM +1100, Jesse Reynolds wrote: >> require => Exec["/bin/mkdir -p $path"], >> require => Sshkey["foohost.usyd.edu.au"], > > Should be: > > require => [ Exec["/bin/mkdir -p $path"], > Sshkey["foohost.usyd.edu.au"] > ] > > This "list" syntax is quite a common one in Puppet, and you''ll use > it (or > see it used) in lots of places.Great, thanks for that. For some reason I thought you needed to have double quotes around items in the list, but obviously not.> > Meanwhile, what are you doing mucking around with University of > Sydney SSH > keys from Adelaide? <grin>Doh, I seem to have suffered a signature context mismatch.