Re: [Puppet Users] Re: Problems with require inside a definition

2010-08-10 Thread Jason Koppe
Yes, that's part of the reason.  I was working on my module at an obscene
hour and that probably factors in to my extra require dance.

On Tue, Aug 10, 2010 at 10:39 AM, Nigel Kersten  wrote:

> Argh. Everyone is doing this require dance because of the docs on
> definitions right?
>
> http://docs.puppetlabs.com/guides/language_tutorial.html#definitions
>
> We had a chat about that on the list a while ago and realized that was
> horribly out of date, I'll try to get a patch in to fix it.
>
>
>
> On Tue, Aug 10, 2010 at 12:31 AM, Jason Koppe
>  wrote:
> > Thanks, that works as expected.
> >
> > On Sun, Aug 8, 2010 at 4:58 PM, Peter Meier 
> wrote:
> >>
> >> -BEGIN PGP SIGNED MESSAGE-
> >> Hash: SHA1
> >>
> >> On 08/07/2010 01:31 AM, Jason Koppe wrote:
> >> > I ended up getting this syntax to work:
> >>
> >> just  minor note:
> >>
> >>
> >> >   4 $id,
> >> >   5 $runlevels = '123456',
> >> >   6 $action = 'respawn',
> >> >   7 $process
> >> >   8 ) {
> >> >   9
> >> >  10 augeas {"inittab_$id":
> >> >  11 context => "/files/etc/inittab",
> >> >  12 force => "true",
> >> >  13 require => $require,
> >>
> >> you don't need to pass the require, the require to the define will
> >> automatically be passed to all it's containing resources.
> >>
> >> cheers pete
> >> -BEGIN PGP SIGNATURE-
> >> Version: GnuPG v1.4.10 (GNU/Linux)
> >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> >>
> >> iEYEARECAAYFAkxfKHcACgkQbwltcAfKi3/JcACfeTWMlELe1ZQ7MZeXCUP4LCZe
> >> iLcAn3yLUEvX3JcF4O5WDo8BJscm2TOE
> >> =4yz3
> >> -END PGP SIGNATURE-
> >>
> >> --
> >> 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.
> >>
> >
> >
> >
> > --
> > Jason Koppe
> > jason.robert.ko...@gmail.com
> > Cell (210) 445-8242
> >
> > --
> > 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.
> >
>
>
>
> --
> nigel
>
> --
> 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.
>
>


-- 
Jason Koppe
jason.robert.ko...@gmail.com
Cell (210) 445-8242

-- 
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.



Re: [Puppet Users] Re: Problems with require inside a definition

2010-08-10 Thread Nigel Kersten
Argh. Everyone is doing this require dance because of the docs on
definitions right?

http://docs.puppetlabs.com/guides/language_tutorial.html#definitions

We had a chat about that on the list a while ago and realized that was
horribly out of date, I'll try to get a patch in to fix it.



On Tue, Aug 10, 2010 at 12:31 AM, Jason Koppe
 wrote:
> Thanks, that works as expected.
>
> On Sun, Aug 8, 2010 at 4:58 PM, Peter Meier  wrote:
>>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> On 08/07/2010 01:31 AM, Jason Koppe wrote:
>> > I ended up getting this syntax to work:
>>
>> just  minor note:
>>
>>
>> >   4                 $id,
>> >   5                 $runlevels = '123456',
>> >   6                 $action = 'respawn',
>> >   7                 $process
>> >   8         ) {
>> >   9
>> >  10                 augeas {"inittab_$id":
>> >  11                         context => "/files/etc/inittab",
>> >  12                         force => "true",
>> >  13                         require => $require,
>>
>> you don't need to pass the require, the require to the define will
>> automatically be passed to all it's containing resources.
>>
>> cheers pete
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG v1.4.10 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAkxfKHcACgkQbwltcAfKi3/JcACfeTWMlELe1ZQ7MZeXCUP4LCZe
>> iLcAn3yLUEvX3JcF4O5WDo8BJscm2TOE
>> =4yz3
>> -END PGP SIGNATURE-
>>
>> --
>> 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.
>>
>
>
>
> --
> Jason Koppe
> jason.robert.ko...@gmail.com
> Cell (210) 445-8242
>
> --
> 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.
>



-- 
nigel

-- 
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.



Re: [Puppet Users] Re: Problems with require inside a definition

2010-08-10 Thread Jason Koppe
Thanks, that works as expected.

On Sun, Aug 8, 2010 at 4:58 PM, Peter Meier  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 08/07/2010 01:31 AM, Jason Koppe wrote:
> > I ended up getting this syntax to work:
>
> just  minor note:
>
>
> >   4 $id,
> >   5 $runlevels = '123456',
> >   6 $action = 'respawn',
> >   7 $process
> >   8 ) {
> >   9
> >  10 augeas {"inittab_$id":
> >  11 context => "/files/etc/inittab",
> >  12 force => "true",
> >  13 require => $require,
>
> you don't need to pass the require, the require to the define will
> automatically be passed to all it's containing resources.
>
> cheers pete
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkxfKHcACgkQbwltcAfKi3/JcACfeTWMlELe1ZQ7MZeXCUP4LCZe
> iLcAn3yLUEvX3JcF4O5WDo8BJscm2TOE
> =4yz3
> -END PGP SIGNATURE-
>
> --
> 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.
>
>


-- 
Jason Koppe
jason.robert.ko...@gmail.com
Cell (210) 445-8242

-- 
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.



Re: [Puppet Users] Re: Problems with require inside a definition

2010-08-08 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 08/07/2010 01:31 AM, Jason Koppe wrote:
> I ended up getting this syntax to work:

just  minor note:


>   4 $id,
>   5 $runlevels = '123456',
>   6 $action = 'respawn',
>   7 $process
>   8 ) {
>   9
>  10 augeas {"inittab_$id":
>  11 context => "/files/etc/inittab",
>  12 force => "true",
>  13 require => $require,

you don't need to pass the require, the require to the define will
automatically be passed to all it's containing resources.

cheers pete
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxfKHcACgkQbwltcAfKi3/JcACfeTWMlELe1ZQ7MZeXCUP4LCZe
iLcAn3yLUEvX3JcF4O5WDo8BJscm2TOE
=4yz3
-END PGP SIGNATURE-

-- 
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.



Re: [Puppet Users] Re: Problems with require inside a definition

2010-08-06 Thread Jason Koppe
Just in case anyone searches on some keywords in this thread, I feel it only
appropriate to put the final, working manifests here.  Note that the
environment variable in Exec['install supervisor'] changed to lower case and
the set for $id/process in the define uses quotes around the value since the
value provided has a space.

  1 # class to install supervisor
  2 class supervisor {
  3 include inittab
  4
  5 # pre-requisites
  6 package{"python-setuptools":
  7 ensure => installed,
  8 }
  9
 10 # install supervisor
 11 # this will resolve some python dependencies
 12 # also, ausprod probably needs the http_proxy
 13 exec{"install supervisor":
 14 command => "/usr/bin/easy_install supervisor",
 15 environment => $hostname ? {
 16 /^ind/ => 'http_proxy=http://proxyservice:3128',
 17 default => '',
 18 },
 19 require => Package['python-setuptools'],
 20 creates => '/usr/local/bin/supervisord',
 21 logoutput => "on_failure",
 22 }
 23
 24 # default supervisord.conf for supervisord and supervisordctl
should not be readable by world
 25 file{"/etc/supervisord.conf":
 26 owner => 'root',
 27 group => 'root',
 28 mode => '600',
 29 source =>
"puppet:///modules/supervisor/supervisord.conf",
 30 }
 31
 32 # running 'init a' will start supervisord -- should be called at
the end of /etc/init.d/Indeed to start tomcats after slaving/caching
 33 inittab::conf{"supervisor":
 34 id => 'supe',
 35 runlevels => 'a',
 36 action => 'respawn',
 37 process => '/usr/local/bin/supervisord -n',
 38 require => Exec["install supervisor"],
 39 }
...


  1 # generic class to allow /etc/inittab management
  2 class inittab {
  3 define conf (
  4 $id,
  5 $runlevels = '123456',
  6 $action = 'respawn',
  7 $process
  8 ) {
  9
 10 augeas {"inittab_$id":
 11 context => "/files/etc/inittab",
 12 force => "true",
 13 require => $require,
 14 changes => [
 15 "set $id/runlevels $runlevels",
 16 "set $id/action $action",
 17 "set $id/process '$process'",
 18 ],
 19 }
 20 }
 21
 22 }



On Fri, Aug 6, 2010 at 6:31 PM, Jason Koppe wrote:

> I ended up getting this syntax to work:
>
> Here is the class calling the define:
>
>   2 class supervisor {
> ...
>  13 exec{"install supervisor":
> ...
>  32
>  33 # running 'init a' will start supervisord -- should be called
> at the end of /etc/init.d/Indeed to start tomcats after slaving/caching
>  34 inittab::conf{"supervisor":
>  35 id => 'supe',
>  36 runlevels => 'a',
>  37 action => 'respawn',
>  38 process => '/usr/local/bin/supervisord -n',
>  39 require => Exec["install supervisor"],
>  40 }
>
>
> Here is the inittab module with the define:
>
>
>   1 # generic class to allow /etc/inittab management
>   2 class inittab {
>   3 define conf (
>   4 $id,
>   5 $runlevels = '123456',
>   6 $action = 'respawn',
>   7 $process
>   8 ) {
>   9
>  10 augeas {"inittab_$id":
>  11 context => "/files/etc/inittab",
>  12 force => "true",
>  13 require => $require,
>  14 changes => [
>  15 "set $id/runlevels $runlevels",
>  16 "set $id/action $action",
>  17 "set $id/process $process",
>  18 ],
>  19 }
>  20 }
>  21
>  22 }
>
>
>
>
> On Fri, Aug 6, 2010 at 6:21 PM, Jason Koppe 
> wrote:
>
>> If you just mean this:
>>
>>   1 # generic class to allow /etc/inittab management
>>   2 class inittab {
>>   3 define conf (
>>   4 $id,
>>   5 $runlevels = '123456',
>>   6 $action = 'respawn',
>>   7 $process
>>   8 ) {
>>   9 $require
>>  10
>>  11 augeas {"inittab_$id":
>>  12 context => "/files/etc/inittab",
>>  13 changes => [
>>  14 "set $id/runlevels $runlevels",
>>  15 "set $id/action $ac

Re: [Puppet Users] Re: Problems with require inside a definition

2010-08-06 Thread Jason Koppe
I ended up getting this syntax to work:

Here is the class calling the define:

  2 class supervisor {
...
 13 exec{"install supervisor":
...
 32
 33 # running 'init a' will start supervisord -- should be called at
the end of /etc/init.d/Indeed to start tomcats after slaving/caching
 34 inittab::conf{"supervisor":
 35 id => 'supe',
 36 runlevels => 'a',
 37 action => 'respawn',
 38 process => '/usr/local/bin/supervisord -n',
 39 require => Exec["install supervisor"],
 40 }


Here is the inittab module with the define:

  1 # generic class to allow /etc/inittab management
  2 class inittab {
  3 define conf (
  4 $id,
  5 $runlevels = '123456',
  6 $action = 'respawn',
  7 $process
  8 ) {
  9
 10 augeas {"inittab_$id":
 11 context => "/files/etc/inittab",
 12 force => "true",
 13 require => $require,
 14 changes => [
 15 "set $id/runlevels $runlevels",
 16 "set $id/action $action",
 17 "set $id/process $process",
 18 ],
 19 }
 20 }
 21
 22 }



On Fri, Aug 6, 2010 at 6:21 PM, Jason Koppe wrote:

> If you just mean this:
>
>   1 # generic class to allow /etc/inittab management
>   2 class inittab {
>   3 define conf (
>   4 $id,
>   5 $runlevels = '123456',
>   6 $action = 'respawn',
>   7 $process
>   8 ) {
>   9 $require
>  10
>  11 augeas {"inittab_$id":
>  12 context => "/files/etc/inittab",
>  13 changes => [
>  14 "set $id/runlevels $runlevels",
>  15 "set $id/action $action",
>  16 "set $id/process $process",
>  17 ],
>  18 }
>  19 }
>  20
>  21 }
>
>
> Now, I'm getting this error:
> err: Could not retrieve catalog from remote server: Error 400 on SERVER:
> Could not parse for environment jkoppe: Syntax error at 'augeas'; expected
> '}' at
> /home/jkoppe/svn/production/puppet/modules/inittab/manifests/init.pp:11 on
> node indtst5
>
>
>
> On Fri, Aug 6, 2010 at 6:13 PM, Jason Koppe 
> wrote:
>
>> I'm having similar problems, should it be:
>>
>> class inittab {
>> define conf (
>> $id,
>> $runlevels = '123456',
>> $action = 'respawn',
>> $process
>> ) {
>> $require {
>> $require
>> }
>>
>> augeas {"inittab_$id":
>> context => "/files/etc/inittab",
>> changes => [
>> "set $id/runlevels $runlevels",
>> "set $id/action $action",
>> "set $id/process $process",
>> ],
>>
>>
>> }
>> }
>>
>> }
>>
>> With that, I get:
>> err: Could not retrieve catalog from remote server: Error 400 on SERVER:
>> Could not parse for environment jkoppe: Syntax error at '{'; expected '}' at
>> /home/jkoppe/svn/production/puppet/modules/inittab/manifests/init.pp:10 on
>> node indtst5
>>
>>
>> On Mon, Jul 12, 2010 at 6:48 AM, Tim  wrote:
>>
>>> Thanks, that fixed it.
>>>
>>> On Jul 9, 5:10 pm, Alan Barrett  wrote:
>>> > On Fri, 09 Jul 2010, Tim wrote:
>>> > > # Generic config file
>>> > > define config-file ($fullpath, $source) {
>>> > > if $require {
>>> > > require $require
>>> > > }
>>> > > file { $fullpath:
>>> > > source => 
>>> > > "puppet://puppet.hq.eso.org/modules/${source}
>>> ",
>>> > > backup => mainbackup,
>>> > > mode => 644,
>>> > > ensure => file,
>>> > > group => root,
>>> > > owner => root
>>> > > }
>>> > > }
>>> >
>>> > Just delete the "if" statement and the explicit "require" statement,
>>> and
>>> > the right thing should happen.  Any "require" passed to your definition
>>> > should propagate to the "file" resource insuide the definition
>>> > automatically.
>>> >
>>> > --apb (Alan Barrett)
>>>
>>> --
>>> 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.
>>>

Re: [Puppet Users] Re: Problems with require inside a definition

2010-08-06 Thread Jason Koppe
If you just mean this:

  1 # generic class to allow /etc/inittab management
  2 class inittab {
  3 define conf (
  4 $id,
  5 $runlevels = '123456',
  6 $action = 'respawn',
  7 $process
  8 ) {
  9 $require
 10
 11 augeas {"inittab_$id":
 12 context => "/files/etc/inittab",
 13 changes => [
 14 "set $id/runlevels $runlevels",
 15 "set $id/action $action",
 16 "set $id/process $process",
 17 ],
 18 }
 19 }
 20
 21 }


Now, I'm getting this error:
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not parse for environment jkoppe: Syntax error at 'augeas'; expected
'}' at
/home/jkoppe/svn/production/puppet/modules/inittab/manifests/init.pp:11 on
node indtst5


On Fri, Aug 6, 2010 at 6:13 PM, Jason Koppe wrote:

> I'm having similar problems, should it be:
>
> class inittab {
> define conf (
> $id,
> $runlevels = '123456',
> $action = 'respawn',
> $process
> ) {
> $require {
> $require
> }
>
> augeas {"inittab_$id":
> context => "/files/etc/inittab",
> changes => [
> "set $id/runlevels $runlevels",
> "set $id/action $action",
> "set $id/process $process",
> ],
>
>
> }
> }
>
> }
>
> With that, I get:
> err: Could not retrieve catalog from remote server: Error 400 on SERVER:
> Could not parse for environment jkoppe: Syntax error at '{'; expected '}' at
> /home/jkoppe/svn/production/puppet/modules/inittab/manifests/init.pp:10 on
> node indtst5
>
>
> On Mon, Jul 12, 2010 at 6:48 AM, Tim  wrote:
>
>> Thanks, that fixed it.
>>
>> On Jul 9, 5:10 pm, Alan Barrett  wrote:
>> > On Fri, 09 Jul 2010, Tim wrote:
>> > > # Generic config file
>> > > define config-file ($fullpath, $source) {
>> > > if $require {
>> > > require $require
>> > > }
>> > > file { $fullpath:
>> > > source => 
>> > > "puppet://puppet.hq.eso.org/modules/${source}
>> ",
>> > > backup => mainbackup,
>> > > mode => 644,
>> > > ensure => file,
>> > > group => root,
>> > > owner => root
>> > > }
>> > > }
>> >
>> > Just delete the "if" statement and the explicit "require" statement, and
>> > the right thing should happen.  Any "require" passed to your definition
>> > should propagate to the "file" resource insuide the definition
>> > automatically.
>> >
>> > --apb (Alan Barrett)
>>
>> --
>> 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.
>>
>>
>
>
> --
> Jason Koppe
> jason.robert.ko...@gmail.com
> Cell (210) 445-8242
>



-- 
Jason Koppe
jason.robert.ko...@gmail.com
Cell (210) 445-8242

-- 
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.



Re: [Puppet Users] Re: Problems with require inside a definition

2010-08-06 Thread Jason Koppe
I'm having similar problems, should it be:

class inittab {
define conf (
$id,
$runlevels = '123456',
$action = 'respawn',
$process
) {
$require {
$require
}

augeas {"inittab_$id":
context => "/files/etc/inittab",
changes => [
"set $id/runlevels $runlevels",
"set $id/action $action",
"set $id/process $process",
],


}
}

}

With that, I get:
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not parse for environment jkoppe: Syntax error at '{'; expected '}' at
/home/jkoppe/svn/production/puppet/modules/inittab/manifests/init.pp:10 on
node indtst5

On Mon, Jul 12, 2010 at 6:48 AM, Tim  wrote:

> Thanks, that fixed it.
>
> On Jul 9, 5:10 pm, Alan Barrett  wrote:
> > On Fri, 09 Jul 2010, Tim wrote:
> > > # Generic config file
> > > define config-file ($fullpath, $source) {
> > > if $require {
> > > require $require
> > > }
> > > file { $fullpath:
> > > source => 
> > > "puppet://puppet.hq.eso.org/modules/${source}
> ",
> > > backup => mainbackup,
> > > mode => 644,
> > > ensure => file,
> > > group => root,
> > > owner => root
> > > }
> > > }
> >
> > Just delete the "if" statement and the explicit "require" statement, and
> > the right thing should happen.  Any "require" passed to your definition
> > should propagate to the "file" resource insuide the definition
> > automatically.
> >
> > --apb (Alan Barrett)
>
> --
> 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.
>
>


-- 
Jason Koppe
jason.robert.ko...@gmail.com
Cell (210) 445-8242

-- 
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.



[Puppet Users] Re: Problems with require inside a definition

2010-07-12 Thread Tim
Thanks, that fixed it.

On Jul 9, 5:10 pm, Alan Barrett  wrote:
> On Fri, 09 Jul 2010, Tim wrote:
> > # Generic config file
> > define config-file ($fullpath, $source) {
> >         if $require {
> >                 require $require
> >         }
> >         file { $fullpath:
> >         source => "puppet://puppet.hq.eso.org/modules/${source}",
> >         backup => mainbackup,
> >         mode => 644,
> >         ensure => file,
> >         group => root,
> >         owner => root
> >         }
> > }
>
> Just delete the "if" statement and the explicit "require" statement, and
> the right thing should happen.  Any "require" passed to your definition
> should propagate to the "file" resource insuide the definition
> automatically.
>
> --apb (Alan Barrett)

-- 
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.