I have a ''config-file'' definition which handles config files for various modules that I''ve written. I''m trying to enhance it so that I can pass in a package to require because at the moment puppet is erroring trying to create config files before the relevant package has created certain directories: # 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 } } Then in one of my modules I''m trying to use it with: config-file { "amandaconf": fullpath => "/etc/amanda/amanda- client.conf", source => "amanda/amanda-client.conf", require => Package["amanda-backup_client"] } But I get this error on the client: err: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `downcase'' for #<Puppet::Parser::Resource::Reference:0x2ae33d189ed0> at /etc/puppet/ manifests/site.pp:38 on node sl5build.hq.eso.org It looks like I''ve got the syntax wrong but I''ve tried several variations and I either get this error or a plain syntax error. I''ve also tried following these instructions: http://docs.reductivelabs.com/guides/language_tutorial.html#definitions -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Alan Barrett
2010-Jul-09 15:10 UTC
Re: [Puppet Users] Problems with require inside a definition
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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Thanks, that fixed it. On Jul 9, 5:10 pm, Alan Barrett <a...@cequrux.com> 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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jason Koppe
2010-Aug-06 23:13 UTC
Re: [Puppet Users] Re: Problems with require inside a definition
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 <tkedwards@fastmail.com.au> wrote:> Thanks, that fixed it. > > On Jul 9, 5:10 pm, Alan Barrett <a...@cequrux.com> 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}<http://puppet.hq.eso.org/modules/$%7Bsource%7D> > ", > > > 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-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- Jason Koppe Jason.Robert.Koppe@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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jason Koppe
2010-Aug-06 23:21 UTC
Re: [Puppet Users] Re: Problems with require inside a definition
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 <jason.robert.koppe@gmail.com>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 <tkedwards@fastmail.com.au> wrote: > >> Thanks, that fixed it. >> >> On Jul 9, 5:10 pm, Alan Barrett <a...@cequrux.com> 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}<http://puppet.hq.eso.org/modules/$%7Bsource%7D> >> ", >> > > 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-users@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> >> > > > -- > Jason Koppe > Jason.Robert.Koppe@gmail.com > Cell (210) 445-8242 >-- Jason Koppe Jason.Robert.Koppe@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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jason Koppe
2010-Aug-06 23:31 UTC
Re: [Puppet Users] Re: Problems with require inside a definition
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 <jason.robert.koppe@gmail.com>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 <jason.robert.koppe@gmail.com>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 <tkedwards@fastmail.com.au> wrote: >> >>> Thanks, that fixed it. >>> >>> On Jul 9, 5:10 pm, Alan Barrett <a...@cequrux.com> 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}<http://puppet.hq.eso.org/modules/$%7Bsource%7D> >>> ", >>> > > 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-users@googlegroups.com. >>> To unsubscribe from this group, send email to >>> puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/puppet-users?hl=en. >>> >>> >> >> >> -- >> Jason Koppe >> Jason.Robert.Koppe@gmail.com >> Cell (210) 445-8242 >> > > > > -- > Jason Koppe > Jason.Robert.Koppe@gmail.com > Cell (210) 445-8242 >-- Jason Koppe Jason.Robert.Koppe@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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jason Koppe
2010-Aug-07 00:02 UTC
Re: [Puppet Users] Re: Problems with require inside a definition
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 <jason.robert.koppe@gmail.com>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 <jason.robert.koppe@gmail.com>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 <jason.robert.koppe@gmail.com >> > 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 <tkedwards@fastmail.com.au> wrote: >>> >>>> Thanks, that fixed it. >>>> >>>> On Jul 9, 5:10 pm, Alan Barrett <a...@cequrux.com> 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}<http://puppet.hq.eso.org/modules/$%7Bsource%7D> >>>> ", >>>> > > 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-users@googlegroups.com. >>>> To unsubscribe from this group, send email to >>>> puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> >>>> . >>>> For more options, visit this group at >>>> http://groups.google.com/group/puppet-users?hl=en. >>>> >>>> >>> >>> >>> -- >>> Jason Koppe >>> Jason.Robert.Koppe@gmail.com >>> Cell (210) 445-8242 >>> >> >> >> >> -- >> Jason Koppe >> Jason.Robert.Koppe@gmail.com >> Cell (210) 445-8242 >> > > > > -- > Jason Koppe > Jason.Robert.Koppe@gmail.com > Cell (210) 445-8242 >-- Jason Koppe Jason.Robert.Koppe@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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Peter Meier
2010-Aug-08 21:58 UTC
Re: [Puppet Users] Re: Problems with require inside a definition
-----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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jason Koppe
2010-Aug-10 07:31 UTC
Re: [Puppet Users] Re: Problems with require inside a definition
Thanks, that works as expected. On Sun, Aug 8, 2010 at 4:58 PM, Peter Meier <peter.meier@immerda.ch> 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-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- Jason Koppe Jason.Robert.Koppe@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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nigel Kersten
2010-Aug-10 15:39 UTC
Re: [Puppet Users] Re: Problems with require inside a definition
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 <jason.robert.koppe@gmail.com> wrote:> Thanks, that works as expected. > > On Sun, Aug 8, 2010 at 4:58 PM, Peter Meier <peter.meier@immerda.ch> 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-users@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > > > > -- > Jason Koppe > Jason.Robert.Koppe@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-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jason Koppe
2010-Aug-11 05:04 UTC
Re: [Puppet Users] Re: Problems with require inside a definition
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 <nigelk@google.com> 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 > <jason.robert.koppe@gmail.com> wrote: > > Thanks, that works as expected. > > > > On Sun, Aug 8, 2010 at 4:58 PM, Peter Meier <peter.meier@immerda.ch> > 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-users@googlegroups.com. > >> To unsubscribe from this group, send email to > >> puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > >> For more options, visit this group at > >> http://groups.google.com/group/puppet-users?hl=en. > >> > > > > > > > > -- > > Jason Koppe > > Jason.Robert.Koppe@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-users@googlegroups.com. > > To unsubscribe from this group, send email to > > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@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-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- Jason Koppe Jason.Robert.Koppe@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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.