diff --git a/manifests/site.pp b/manifests/site.pp index 289cea9ce9..d08361f7ad 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -214,7 +214,7 @@ node 'jenkins-dev.openstack.org' { } } -# Node-OS: precise +# Node-OS: trusty node 'cacti.openstack.org' { include openstack_project::ssl_cert_check class { 'openstack_project::cacti': diff --git a/modules/openstack_project/manifests/cacti.pp b/modules/openstack_project/manifests/cacti.pp index 2c6a69eca1..4b8f79ff84 100644 --- a/modules/openstack_project/manifests/cacti.pp +++ b/modules/openstack_project/manifests/cacti.pp @@ -13,25 +13,19 @@ class openstack_project::cacti ( sysadmins => $sysadmins, } - include ::httpd - - if ! defined(Httpd::Mod['rewrite']) { - httpd::mod { 'rewrite': - ensure => present, - } + class { '::apache': + mpm_module => 'prefork', } + class { '::apache::mod::rewrite': } + class { '::apache::mod::php': } package { 'cacti': ensure => present, } - file { '/etc/apache2/conf.d/cacti.conf': + ::apache::vhost::custom { $::fqdn: ensure => present, - source => 'puppet:///modules/openstack_project/cacti/apache.conf', - mode => '0644', - owner => 'root', - group => 'root', - require => Package['cacti'], + content => template('openstack_project/cacti.vhost.erb'), } file { '/usr/local/share/cacti/resource/snmp_queries': diff --git a/modules/openstack_project/files/cacti/apache.conf b/modules/openstack_project/templates/cacti.vhost.erb similarity index 55% rename from modules/openstack_project/files/cacti/apache.conf rename to modules/openstack_project/templates/cacti.vhost.erb index 361facfa30..f9e81f09bc 100644 --- a/modules/openstack_project/files/cacti/apache.conf +++ b/modules/openstack_project/templates/cacti.vhost.erb @@ -15,16 +15,6 @@ RewriteRule ^/$ /cacti/graph_view.php [R,L] AddType application/x-httpd-php .php - - php_flag magic_quotes_gpc Off - php_flag short_open_tag On - php_flag register_globals Off - php_flag register_argc_argv On - php_flag track_vars On - # this setting is necessary for some locales - php_value mbstring.func_overload 0 - php_value include_path . - - DirectoryIndex index.php +