(Ron - this is probably a question for puppet-users not puppet-devel :-)
You can't redefine hence the error. This applies to most things in puppet
(as it follows the functional language paradigm :-). Best thing is to think
about how you can re-factor the content differently to achieve your goal.
FYI. You could do something like this at top scope in your amanifest.pp:
if $hostname == "box1" {
do something
}
Which would achieve a similar result and avoid redefinition. If you had a
lot you could even use:
case $hostname {
"box1" : { do something }
"box2" : { do something else }
}
But some may argue that redefining like this is possibly bad form
(action-at-a-distance) :-).
Perhaps its best to explain what you are trying to achieve with the 2
manifest files?
ken.
On Thursday, December 9, 2010 9:28:19 PM UTC, Ron wrote:
>
> Is it possible to specify a node twice in two different manifest
> files? For example I need to do something like this but I get an
> error stating that the node is already defined.
>
> amanifest.pp: node box1 { include "dork::a" }
>
> amanifest2.pp node box1 { some other things... unrelated to
> amanifest.pp }
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" 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-dev?hl=en.