From 12e30622fea76b7d1213ed8a6fcb0fcd2e4021c1 Mon Sep 17 00:00:00 2001 From: Spencer Krum Date: Thu, 19 Jun 2014 19:24:31 -0700 Subject: [PATCH] Fix cacti node and add os check Previously a file was being managed that couldn't exist becuase the parent directory did not exist. Cacti succeded in spite of itself because the cacti package pushed an apache config into a place that works. This change sets the file path of the apache.conf file for cacti to be a real location, which adds the rewrite rules. Previously, hitting '/' would not redirect to the graph viewing page, despite that being the intention of the puppet code. This change also adds some logic to fail early on non Debian machines, since we're explicitly using the /etc/apache2 directory here. Change-Id: I29c04d939d7a8d1a0faeb4ab7b31e3adc951ccf3 --- modules/openstack_project/manifests/cacti.pp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/openstack_project/manifests/cacti.pp b/modules/openstack_project/manifests/cacti.pp index 3f6c6baae7..5251157458 100644 --- a/modules/openstack_project/manifests/cacti.pp +++ b/modules/openstack_project/manifests/cacti.pp @@ -4,6 +4,11 @@ class openstack_project::cacti ( $sysadmins = [] ) { + + if $::osfamily != 'Debian' { + fail("${::osfamily} is not supported.") + } + class { 'openstack_project::server': iptables_public_tcp_ports => [80, 443], sysadmins => $sysadmins, @@ -19,7 +24,7 @@ class openstack_project::cacti ( ensure => present, } - file { '/etc/apache2/conf-available/cacti.conf': + file { '/etc/apache2/conf.d/cacti.conf': ensure => present, source => 'puppet:///modules/openstack_project/cacti/apache.conf', mode => '0644',