Yikes. I have two different definitions, one installing components for jboss, and the other installing components for tomcat. I''ve used a definition rather than a class, because we are running multiple copies of each. I have files and packages in jboss that are needed by files in tomcat. Since objects in the scope of one definition aren''t visible to other definitions, how can I make the files in tomcat require => packages that are defined in jboss? Doug -- 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.
On Mon, Sep 6, 2010 at 12:12 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> Yikes. > > I have two different definitions, one installing components for jboss, > and the other installing components for tomcat. I''ve used a definition > rather than a class, because we are running multiple copies of each. I > have files and packages in jboss that are needed by files in tomcat. > Since objects in the scope of one definition aren''t visible to other > definitions, how can I make the files in tomcat require => packages > that are defined in jboss?Well, I know I''ve used definitions in a require before, ones with simple, non qualified names. It appears you can''t use ones with qualified, autoloaded names, because doing this: require => Jboss::server::instance["${name}"] yields this: Sep 6 19:16:17 s_sys@app01.pax.livegamer.com puppet-agent[24812]: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at ''::server::instance''; expected '']'' at /etc/puppet/modules/starterkit/manifests/setup.pp:94 on node app01.pax.livegamer.com *sigh* Doug. -- 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.
There are two standard answers for conflicting items like this. 1) Break out the conflicting items into their own class/definition. 2) Learn to love virtual resources and realize them as necessary. On Mon, Sep 6, 2010 at 12:30 PM, Douglas Garstang <doug.garstang@gmail.com>wrote:> On Mon, Sep 6, 2010 at 12:12 PM, Douglas Garstang > <doug.garstang@gmail.com> wrote: > > Yikes. > > > > I have two different definitions, one installing components for jboss, > > and the other installing components for tomcat. I''ve used a definition > > rather than a class, because we are running multiple copies of each. I > > have files and packages in jboss that are needed by files in tomcat. > > Since objects in the scope of one definition aren''t visible to other > > definitions, how can I make the files in tomcat require => packages > > that are defined in jboss? > > Well, I know I''ve used definitions in a require before, ones with > simple, non qualified names. It appears you can''t use ones with > qualified, autoloaded names, because doing this: > > require => Jboss::server::instance["${name}"] > > yields this: > > Sep 6 19:16:17 s_sys@app01.pax.livegamer.com puppet-agent[24812]: > Could not retrieve catalog from remote server: Error 400 on SERVER: > Syntax error at ''::server::instance''; expected '']'' at > /etc/puppet/modules/starterkit/manifests/setup.pp:94 on node > app01.pax.livegamer.com > > *sigh* > > Doug. > > -- > 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. > >-- 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.
Douglas Garstang
2010-Sep-06 21:21 UTC
Re: [Puppet Users] Re: Cross definition dependancies.
On Mon, Sep 6, 2010 at 1:05 PM, Brian Gallew <geek@gallew.org> wrote:> There are two standard answers for conflicting items like this. > 1) Break out the conflicting items into their own class/definition. > 2) Learn to love virtual resources and realize them as necessary. >Brian, For (1), I don''t see how that would help. If I put the package that''s defined in the jboss definition into a new definition, the same problem would still persist. For (2), I just read through the virtual resource documentation at http://projects.reductivelabs.com/projects/puppet/wiki/Virtual_Resources, and I''m not sure I can see how I would be able to use that to solve this problem. Doug. -- 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.
Douglas Garstang
2010-Sep-06 22:14 UTC
Re: [Puppet Users] Re: Cross definition dependancies.
On Mon, Sep 6, 2010 at 2:21 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> On Mon, Sep 6, 2010 at 1:05 PM, Brian Gallew <geek@gallew.org> wrote: >> There are two standard answers for conflicting items like this. >> 1) Break out the conflicting items into their own class/definition. >> 2) Learn to love virtual resources and realize them as necessary. >> > > Brian, > > For (1), I don''t see how that would help. If I put the package that''s > defined in the jboss definition into a new definition, the same > problem would still persist. > For (2), I just read through the virtual resource documentation at > http://projects.reductivelabs.com/projects/puppet/wiki/Virtual_Resources, > and I''m not sure I can see how I would be able to use that to solve > this problem. > > Doug. >*sigh* Well, I''m having no luck. I first tried putting the virtual resource in the jboss base class, but realized that this wouldn''t work, since we don''t know how many instances we are going to be defining ahead of time, and we also do this everywhere: package { "package1": ensure => "1.2"; } I don''t think it''s documented, but it works quite well for being able to set the version number of RPM''s programatically. I then put this into the jboss instance definition: @package { "lg-jboss-server-inst-${name}": ensure => "${version_core}" } realize(Package["lg-jboss-server-inst-${name}"]) but puppet complains about the value being passed to ensure. It has never done this anywhere else. *sigh* Why so difficult? Doug. -- 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.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1> require => Jboss::server::instance["${name}"]it''s Jboss::Server::Instance -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyFjAMACgkQbwltcAfKi3/YBQCdGXgqFZ3H5pSzPFCG/FuA0UD9 JToAn19trUPiZNLrehVcTlAjTzqbwXrJ =3jMl -----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.