Hi,

I get a "duplicate definition problem" with Puppet 0.24.8 when using
virtual ressource in a define:

Here is a sample :

define mydefine1 {
  @package { postfix: }
}

define mydefine2 {
  mydefine1 { $name: }

  realize Package[postfix]
}

mydefine2 { test1: }
mydefine2 { test2: }

Here is the problem:

Puppet::Parser::AST::Resource failed with error ArgumentError:
Duplicate definition: Package[postfix] is already defined in file
test.pp at line 2

If i move the virtual resource in a class all is working fine. For instance:

class common {
  @package { postfix: }
}

define mydefine1 {
  include common
}

define mydefine2 {
  mydefine1 { $name: }

  realize Package[postfix]
}

mydefine2 { test1: }
mydefine2 { test2: }

Does someone know if it's a bug or if i'm doing things the wrong way?

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


Reply via email to