From 7904825abb578c5c9f47859a272e5fa9df90ad36 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 26 May 2016 10:40:37 -0700 Subject: [PATCH] Configure apache when we use it The kibana apache vhost file makes use of mod rewrite and mod proxy but we don't enable those modules explicitly here. We happen to enable them in other places that use this puppet module but that leads to races and isn't explicit enough. Go ahead and explicitly enable the deps in this puppet module so that it is self sufficient. Change-Id: Ic05f26d61f2ac4b5adffee98782d1a02931d5731 --- manifests/js.pp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/manifests/js.pp b/manifests/js.pp index 3ff5f4b..da7efb2 100644 --- a/manifests/js.pp +++ b/manifests/js.pp @@ -59,12 +59,33 @@ class kibana::js ( subscribe => Vcsrepo[$base_path], } + include ::httpd + if !defined(Httpd_mod['rewrite']) { + httpd_mod { 'rewrite': + ensure => present, + } + } + if !defined(Httpd_mod['proxy']) { + httpd_mod { 'proxy': + ensure => present, + } + } + if !defined(Httpd_mod['proxy_http']) { + httpd_mod { 'proxy_http': + ensure => present, + } + } + httpd::vhost { 'kibana': docroot => "${base_path}/src", vhost_name => $vhost_name, serveraliases => $vhost_aliases, port => 80, template => $vhost_template, + require => [ + Httpd_mod['rewrite'], + Httpd_mod['proxy'], + Httpd_mod['proxy_http'], + ], } - }