Le 26/08/2016 à 01:20:14-0700, Luke Bigum a écrit Thanks for everything.
> https://docs.puppet.com/puppet/latest/reference/lang_containment.html > > To comment on the original poster's problem, if Class[My_drupal_class] is > creating Class[Apache] using the resource like syntax, then Class > [My_drupal_class] is not designed very well. In practice Drupal does not > depend > on Apache. It's a set of PHP files and a MySQL database, and it may or may not > have Apache serve it's PHP (it could be another web server). If Class > [My_drupal_class] is intended to be used under Apache, then it should create > it's own Apache::Vhost resource (assuming Puppetlabs' Apache module) and > that's > it. Then somewhere else in your manifest, you will instantiate Class[Apache] > with all the settings you want. This way you could even run other Apache > services on the same Drupal machine, or, move Drupal to any other Apache > server. Here's a sketch of a role/profile approach I would use: > > class role::mywebserver { > class { 'apache': > all my options... > } > contain profile::drupal > contain profile::some_other_apache_service > Class[apache] -> Class[profile::drupal] > } > > class profile::drupal { > class { 'my_drupal_class': > option => 'something', > parameter => 'something else', > woof => 'meow', > } > apache::vhost { 'my_drupal_vhost': > listen => 80, > docroot => '/opt/drupal', > otherparams => 'I can't remember', > } I will try that. I didn't known the « contain » methods. So until now I use class or include, and the point is it's working with puppet 3.x (as server), but I just switch to puppet 4.x (as server) and stop working. Thanks. Regards. -- 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: ven 26 aoû 2016 22:40:27 CEST -- 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/20160826204721.pl6gbcy7y4q3mkz2%40pcjas.obspm.fr. For more options, visit https://groups.google.com/d/optout.
