Hi there!

Context: HowTo define a somewhat generic serviceinstance

Ive got:
#define.pp
define service::instance ( $instancename, $instanceip ) {
        #do stuff
}

#class.pp
class serviceA {
        service::instance{"funnyname":
                instancename => ["somenameA", "realnameA"],
                instanceip =>   ["1.2.3.4", "2.3.4.5", "3.4.5.6"],
        }
}

which wich works, but (depending on the usecase) is damn ugly and does
not exactly handle the way I want it to..

id like to be able to do:
#define.pp
define service::instance ( $instancename, ${${instancename}_ip} ) {
        #do stuff
}

#class.pp
class serviceA {
        service::instance{"funnyname":
                instancename => ["somenameA", "realnameA"],
                somenameA_ip => "1.2.3.4",
                realnameA_ip => ["2.3.4.5", "3.4.5.6"],
        }
}

But puppet does NOT seem to like this construct "${${instancename}
_ip}" (and I cant really blame it..) - does anyone have a hint as to
how to do this?

Cheers,
Simon

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

Reply via email to