update for new idiom
authorStephen Gran <steve@lobefin.net>
Thu, 3 May 2012 06:10:26 +0000 (07:10 +0100)
committerStephen Gran <steve@lobefin.net>
Thu, 3 May 2012 06:10:26 +0000 (07:10 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/apache2/manifests/config.pp
modules/apache2/manifests/init.pp
modules/roles/manifests/dakmaster.pp

index b67ddbe..9a11115 100644 (file)
@@ -1,10 +1,14 @@
-define apache2::config($config = undef, $template = undef, $ensure = present) {
+define apache2::config (
+       $source=undef,
+       $content=undef,
+       $ensure=present
+) {
 
        include apache2
 
        case $ensure {
                present: {
-                       if ! ($config or $template) {
+                       if ! ($source or $content) {
                                fail ( "No configuration found for ${name}" )
                        }
                }
@@ -12,17 +16,17 @@ define apache2::config($config = undef, $template = undef, $ensure = present) {
                default: { fail ( "Unknown ensure value: '$ensure'" ) }
        }
 
-       if $template {
+       if $content {
                file { "/etc/apache2/conf.d/${name}":
                        ensure  => $ensure,
-                       content => template($template),
+                       content => $content,
                        require => Package['apache2'],
                        notify  => Service['apache2'],
                }
        } else {
                file { "/etc/apache2/conf.d/${name}":
                        ensure  => $ensure,
-                       source  => $config,
+                       source  => $source,
                        require => Package['apache2'],
                        notify  => Service['apache2'],
                }
index 8c1afa1..082b863 100644 (file)
@@ -22,19 +22,19 @@ class apache2 {
        }
 
        apache2::config { 'ressource-limits':
-               template => 'apache2/ressource-limits.erb',
+               content => template('apache2/ressource-limits.erb'),
        }
 
        apache2::config { 'security':
-               config => 'puppet:///modules/apache2/security',
+               source => 'puppet:///modules/apache2/security',
        }
 
        apache2::config { 'local-serverinfo':
-               config => 'puppet:///modules/apache2/local-serverinfo',
+               source => 'puppet:///modules/apache2/local-serverinfo',
        }
 
        apache2::config { 'server-status':
-               config => 'puppet:///modules/apache2/server-status',
+               source => 'puppet:///modules/apache2/server-status',
        }
 
        file { '/etc/apache2/sites-available/common-ssl.inc':
index 0cf923a..7209bef 100644 (file)
@@ -7,7 +7,7 @@ class roles::dakmaster {
        apache2::module { 'macro': }
 
        apache2::config { 'puppet-builddlist':
-               template => 'roles/dakmaster/conf-builddlist.erb',
+               content => template('roles/dakmaster/conf-builddlist.erb'),
        }
 
 }