On Thu, Aug 11, 2011 at 08:30:37AM -0700, Aaron Grewell wrote: > It's fine, just make sure class2 requires class1. That's what requires are > for. >
Unfortunately it still doesnt worked. Changed class2 to
class mod2::class2 {
file { $mod1::class1::message:
ensure => file,
require => Class['mod1::class1'],
}
}
Manifest is still
class { 'mod2::class2': }
class { 'mod1::class1': message => 'Hallo Welt'}
What I get is
warning: Scope(Class[Mod2::Class2]): Could not look up qualified
variable 'mod1::class1::message'; class mod1::class1 has not been
evaluated at /tmp/modules/mod2/manifests/class2.pp:2
notice: Scope(Class[Mod1::Class1]): Hallo Welt
Parameter path failed: File paths must be fully qualified, not 'undef'
at /tmp/modules/mod2/manifests/class2.pp:5
If I change the order in the manifest it works.
-Stefan
> On Thu, Aug 11, 2011 at 8:26 AM, Stefan Schulte <
> [email protected]> wrote:
>
> > On Sat, Aug 06, 2011 at 04:14:31PM +0200, Stefan Schulte wrote:
> > > Is it ALWAYS safe to access
> > $::my_application::paramBalsoInterestingForBackup
> > > inside the backup::client class or can I run into ordering issues?
> >
> > At least I can answer this question my self: It is not safe, you can end
> > up with
> >
> > 2 Modules with one class each
> >
> > class mod1::class1($message) {
> > $messag = $message
> > notice $message
> > }
> > class mod2::class2 {
> > notice $mod1::class1::message
> > }
> >
> > 1 Manifest
> >
> > class { 'mod2::class2': }
> > class { 'mod1::class1': message => 'Hallo Welt'}
> >
> > Output
> >
> > warning: Scope(Class[Mod2::Class2]): Could not look up qualified
> > variable 'mod1::class1::message'; class mod1::class1 has not been
> > evaluated at /tmp/modules/mod2/manifests/class2.pp:2
> > notice: Scope(Class[Mod2::Class2]):
> > notice: Scope(Class[Mod1::Class1]): Hallo Welt
> > info: Applying configuration version '1313075940'
> > notice: Finished catalog run in 0.16 seconds
> >
> >
> > -Stefan
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
pgpkmpazStcKQ.pgp
Description: PGP signature
