12 if ! ($source or $content) {
13 fail ( "No configuration found for ${name}" )
17 default: { fail ( "Unknown ensure value: '$ensure'" ) }
26 $target = "/etc/apache2/sites-available/${base}"
28 $link_target = $ensure ? {
37 require => Package['apache2'],
38 notify => Exec['service apache2 reload'],
44 require => Package['apache2'],
45 notify => Exec['service apache2 reload'],
49 $symlink = "/etc/apache2/sites-enabled/${name}.conf"
51 file { "/etc/apache2/sites-enabled/${name}":
53 notify => Exec['service apache2 reload'],
56 if $ensure == present {
59 target => $link_target,
60 notify => Exec['service apache2 reload'],
65 notify => Exec['service apache2 reload'],