I'm writing a module to configure Oracle Weblogic (against my will).
I've created a type to handle the configuration of the config.xml file for the domain. In puppet, you'd use it like this:
weblogic_domain{ $name:
admin_server => $admin_server,
domains_dir => $domains_dir,
require => Exec["creating admin server for ${domain}"]
}
so that's great... If i change my $admin_server, then my type changes admin_server in config.xml.
I'm having a bit of trouble, however, with the next part. A 'domain' in weblogic contains 'servers'... basically a hostname and port. I *could* do this:
weblogic_domain{ $name:
admin_server => $admin_server,
domains_dir => $domains_dir,
servers => $hash_of_servers_and_ports
require => Exec["creating admin server for ${domain}"]
}
but what I'd really like to do is on each server, declare something like this:
@weblogic_server{ $name:
domain => myDomain
port => 8000
}
and then have my type gather up all the virtual resources and drop them into the server.xml automagically.
SO... how do I access the instances of one type from a different type? Can it be done? I've read the O'Reilly book on Types/Providers, skimmed a couple other books and scoured github for an example of this but I've come up with nothing.
please sir, a tuppence for a clue
--steev