Trevor, Thanks for the suggestion. That certainly looks like a good match for the example I've given. An other example we are working on is WLS. For WLS we need access to:
- - user - domain - domains_path - connect_url - admin_server Although some of these elements would fit perfectly in a composite namevar, I feel some others don't. Besides, it would make a very long name. Any thoughts on how to handle this? Thanx in advance, Bert Op maandag 17 februari 2014 23:30:22 UTC+1 schreef Trevor Vaughan: > > You might want to take a look at using Composite Namevars. > > A good example exists in the java_ks type > https://github.com/puppetlabs/puppetlabs-java_ks. > > Trevor > > > On Mon, Feb 17, 2014 at 4:53 PM, bert hajee <[email protected]<javascript:> > > wrote: > >> L.S, >> >> What is the idiomatic Puppet way to get global context in a instances >> method for a custom provider? >> >> I’m building a custom type and provider for some Oracle items. Oracle can >> have multiple databases running on a system. So I need a way to tell the >> instances method to which database to connect. >> >> I’ve got a couple of idea’s myself, but don’t know which is best and if >> there are better ways: >> >> >> 1. Not using the instances method. This means I can use a regular >> parameter to specify to which database to connect. But I lose the ability >> to list my resources with puppet resource tablespace. >> 2. a custom type providing some defaults e.g. >> ora_settings{'default': >> database => 'mydb'} >> And store this information and use it in the regular resources. This >> fits well with Puppet, but requires an extra custom type. >> 3. Just use some environment variables. This doesn’t fit well within >> a Puppet workflow >> 4. Use an external fact. This seems like misuse of a Fact, But it is >> easy to access this information in a custom provider >> >> Any thoughts are appreciated? >> >> Bert >> >> >> >> >> >> >> >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/puppet-dev/dd048be9-2a72-4857-a7b5-13aaa96cc2dd%40googlegroups.com >> . >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Trevor Vaughan > Vice President, Onyx Point, Inc > (410) 541-6699 > [email protected] <javascript:> > > -- This account not approved for unencrypted proprietary information -- > -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/a625f9c2-adf5-4c78-8036-11c89d3741d1%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
