From: Stephen Gran Date: Thu, 3 May 2012 06:10:26 +0000 (+0100) Subject: update for new idiom X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=2ddafbd75b7bde2fac3e5293b824c727c5b3105a;p=mirror%2Fdsa-puppet.git update for new idiom Signed-off-by: Stephen Gran --- diff --git a/modules/apache2/manifests/config.pp b/modules/apache2/manifests/config.pp index b67ddbee7..9a1111501 100644 --- a/modules/apache2/manifests/config.pp +++ b/modules/apache2/manifests/config.pp @@ -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'], } diff --git a/modules/apache2/manifests/init.pp b/modules/apache2/manifests/init.pp index 8c1afa14e..082b8631c 100644 --- a/modules/apache2/manifests/init.pp +++ b/modules/apache2/manifests/init.pp @@ -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': diff --git a/modules/roles/manifests/dakmaster.pp b/modules/roles/manifests/dakmaster.pp index 0cf923ad1..7209befb7 100644 --- a/modules/roles/manifests/dakmaster.pp +++ b/modules/roles/manifests/dakmaster.pp @@ -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'), } }