Le 16/11/2016 à 10:34:36+0100, Craig Dunn a écrit > > > On Wed, Nov 16, 2016 at 10:18 AM, Albert Shih <[email protected]> wrote: > > Le 16/11/2016 à 09:34:50+0100, Craig Dunn a écrit > > > This is exaclty what I try to do. Event I sometime use create_resources > (or > now loop). But I don't see how I can do for a data needed by two profile > like a share password. Or if I take your sample "webserver", "security", > "base", > "tomcat". If I installed tomcat in some place ('/opt/tomcat') how the > module who manage the war going to kown where to put the war ? > > > > As I said there are times when you need to populate profile data, and it > sounds > like you've thought well about that - as far as your tomcat example goes, it > would be better to use the component module as an API to determine the install > path (if possible) - something like this assuming you are using puppetlabs/ > tomcat.... > > # Tomcat class has an attribute called "catalina_home" which is looked up from > hiera data binding.... > include ::tomcat > > class { "my_application": > tomcat_root => $::tomcat::catalina_home > }
SUPER nice..... I didn't think about that.... Don't know why but I always thought that was « bad practice » to access some attribute from outside the module. Lots of thanks. Regar -- Albert SHIH DIO bâtiment 15 Observatoire de Paris 5 Place Jules Janssen 92195 Meudon Cedex France xmpp: [email protected] Heure local/Local time: mer 16 nov 2016 10:37:23 CET -- You received this message because you are subscribed to the Google Groups "Puppet Users" 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-users/20161116094208.GB28733%40pcjas.obspm.fr. For more options, visit https://groups.google.com/d/optout.
