-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}" )
}
}
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'],
}
}
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':
apache2::module { 'macro': }
apache2::config { 'puppet-builddlist':
- template => 'roles/dakmaster/conf-builddlist.erb',
+ content => template('roles/dakmaster/conf-builddlist.erb'),
}
}