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
This commit is contained in:
Spencer Krum 2014-06-19 19:24:31 -07:00
parent 7242eaef96
commit 12e30622fe

View File

@ -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',