From 0a7cb567bdf4a4ff4340182ca2b72329caf149b1 Mon Sep 17 00:00:00 2001 From: Jonathan Lassoff Date: Thu, 7 Jun 2012 10:27:38 -0700 Subject: [PATCH] Fix variables, modernize puppet. --- manifests/basic.pp | 2 +- manifests/debian.pp | 3 ++- manifests/init.pp | 12 ++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/manifests/basic.pp b/manifests/basic.pp index 0445c25..1ef328c 100644 --- a/manifests/basic.pp +++ b/manifests/basic.pp @@ -14,7 +14,7 @@ apache2::config { "mpm": order => "010", ensure => present, - content => template("apache2/mpm-$real_apache2_mpm.conf.erb"), + content => template("apache2/mpm-${real_apache2_mpm}.conf.erb"), } apache2::config { "mime": diff --git a/manifests/debian.pp b/manifests/debian.pp index 40d95b5..c4cd3bc 100644 --- a/manifests/debian.pp +++ b/manifests/debian.pp @@ -4,8 +4,9 @@ # this class attempts to mimic the default configuration of the debian # apache2 package +include apache2 class apache2::debian inherits apache2 { - apache2::config { "debian.conf": + apache2::config { "debian": order => "000", ensure => present, } diff --git a/manifests/init.pp b/manifests/init.pp index ca22a7c..56405a5 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -8,12 +8,12 @@ # lifting. see the other subclasses for friendlier versions. # note: this code is currently very deb/ubuntu-specific -$apache_sites = "/etc/apache2/sites" -$apache_includes = "/etc/apache2/site-includes" -$apache_mods = "/etc/apache2/mods" -$apache_conf = "/etc/apache2/conf.d" class apache2 { + $apache_sites = "/etc/apache2/sites" + $apache_includes = "/etc/apache2/site-includes" + $apache_mods = "/etc/apache2/mods" + $apache_conf = "/etc/apache2/conf.d" $real_apache2_mpm = $apache2_mpm ? { '' => 'worker', default => $apache2_mpm } case $real_apache2_mpm { @@ -86,7 +86,7 @@ mode => 644, owner => root, group => root, - source => "puppet://$servername/apache2/apache2.conf", + source => "puppet://$servername/modules/apache2/apache2.conf", require => File[$apache_conf], } @@ -124,7 +124,7 @@ file { "${apache_conf}/${order}-${name}.conf": ensure => $ensure, - content => $content, + content => $real_content, mode => 644, owner => root, group => root,