Le 16/11/2016 à 10:51:39+0100, Craig Dunn a écrit

Hi,

>     > 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.
>
>
> Not at all - especially not when done from the profiles.
>
> A module's attributes are effectively it's API - by accessing
> $::tomcat::catalina_home you don't need to know or care if the value is being
> set by hiera or by the modules default (params.pp), and it's the best source 
> of
> truth for that value.  This is a very good example of the benefits of profiles
> too.

Is they are any equivalent about ressources create by « define ». For
example I would like to get all vhost create by

  apache::vhost

in some supervision module.

I try

  $::apache::vhost

and didn't work.

The purpose is to automatically create supervision of each vhost by

  class apache_supervision {

    $vhost_hash = $::apache::vhost
    $vhost_hash.each | String $site_name, $Hash $site_info |
    etc.
    }

Regards.


NB: I answer to a old post, hope that's not against some rule...

--
Albert SHIH
DIO bâtiment 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: [email protected]
Heure local/Local time:
lun 5 déc 2016 16:07: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/20161205150820.GL14188%40pcjas.obspm.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to