From e3b276c65062b497ce39b05a5b3c776eae705eb8 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Thu, 9 Jul 2015 14:41:34 -0400 Subject: [PATCH] Migrate to puppet-httpd module puppet-httpd is the openstack-infra version of puppetlabs-apache (0.0.4) release. This patchset will remove the puppetlabs-apache namespace from -infra allowing for possible future patchsets to use newer puppetlabs-apache modules. Change-Id: I39d337bd09ede21289be67c3c2666aa543e3ec3e Signed-off-by: Paul Belanger --- manifests/init.pp | 8 +++++++- manifests/site.pp | 21 ++++++++++++++++----- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 37629f2..f3e347f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,5 +1,11 @@ class meetbot { - include apache + # NOTE(pabelanger): Until we full remove puppetlabs-apache from + # system-config, we need to do this hack to avoid a circular dependency. + if ! defined(Class['::apache']) { + include ::httpd + } else { + include ::apache + } vcsrepo { '/opt/meetbot': ensure => latest, diff --git a/manifests/site.pp b/manifests/site.pp index c9ab557..5fa3f4c 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -13,11 +13,22 @@ define meetbot::site( $varlib = "/var/lib/meetbot/${name}" $meetbot = "/srv/meetbot-${name}" - apache::vhost { $vhost_name: - port => 80, - docroot => "/srv/meetbot-${name}", - priority => '50', - template => 'meetbot/vhost.erb', + # NOTE(pabelanger): Until we full remove puppetlabs-apache from + # system-config, we need to do this hack to avoid a circular dependency. + if ! defined(Class['::apache']) { + ::httpd::vhost { $vhost_name: + port => 80, + docroot => "/srv/meetbot-${name}", + priority => '50', + template => 'meetbot/vhost.erb', + } + } else { + ::apache::vhost { $vhost_name: + port => 80, + docroot => "/srv/meetbot-${name}", + priority => '50', + template => 'meetbot/vhost.erb', + } } file { $varlib: