From 9e29d86dd5222295e56362ecbe8a293ce932c6b4 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 6 Mar 2016 13:57:51 -0300 Subject: Fix conflicting parameter name (2) --- manifests/site.pp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'manifests/site.pp') diff --git a/manifests/site.pp b/manifests/site.pp index 5d92a3f..19f7783 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -116,14 +116,14 @@ define apache::site( } # Legacy configuration - file { [ "${apache::sites}-available/$vhost", - "${apache::sites}-enabled/$vhost" ]: + file { [ "${apache::conf_sites}-available/$vhost", + "${apache::conf_sites}-enabled/$vhost" ]: ensure => absent, } case $source { true: { - file { "${apache::sites}-available/$vhost.conf": + file { "${apache::conf_sites}-available/$vhost.conf": ensure => $ensure, source => [ "puppet:///modules/site_apache/vhosts/$domain/${name}", "puppet:///modules/site_apache/vhosts/${name}" ], @@ -135,7 +135,7 @@ define apache::site( } } false: { - file { "${apache::sites}-available/$vhost.conf": + file { "${apache::conf_sites}-available/$vhost.conf": ensure => $ensure, content => template("$template"), owner => root, @@ -150,7 +150,7 @@ define apache::site( # Enable the site without a2ensite # #$status = $ensure ? { - # 'present' => "${apache::sites}-available/$vhost.conf", + # 'present' => "${apache::conf_sites}-available/$vhost.conf", # default => 'absent', #} # @@ -158,7 +158,7 @@ define apache::site( # ensure => $status, # owner => root, # group => root, - # require => File["${apache::sites}-available/${name}"], + # require => File["${apache::conf_sites}-available/${name}"], # notify => Service["apache"], #} @@ -189,9 +189,9 @@ define apache::site( 'wheezy' => "/usr/sbin/a2ensite $vhost.conf", default => "/usr/sbin/a2ensite $vhost", }, - unless => "/bin/sh -c '[ -L ${apache::sites}-enabled/$vhost.conf ] \ - && [ ${apache::sites}-enabled/$vhost.conf -ef ${apache::sites}-available/$vhost.conf ]'", - require => File["${apache::sites}-available/$vhost.conf"], + unless => "/bin/sh -c '[ -L ${apache::conf_sites}-enabled/$vhost.conf ] \ + && [ ${apache::conf_sites}-enabled/$vhost.conf -ef ${apache::conf_sites}-available/$vhost.conf ]'", + require => File["${apache::conf_sites}-available/$vhost.conf"], notify => Exec["reload-apache2"], } } @@ -201,13 +201,13 @@ define apache::site( 'wheezy' => "/usr/sbin/a2dissite $vhost.conf", default => "/usr/sbin/a2dissite $vhost", }, - onlyif => "/bin/sh -c '[ -L ${apache::sites}-enabled/$vhost.conf ] \ - && [ ${apache::sites}-enabled/$vhost.conf -ef ${apache::sites}-available/$vhost.conf ]'", - require => File["${apache::sites}-available/$vhost.conf"], + onlyif => "/bin/sh -c '[ -L ${apache::conf_sites}-enabled/$vhost.conf ] \ + && [ ${apache::conf_sites}-enabled/$vhost.conf -ef ${apache::conf_sites}-available/$vhost.conf ]'", + require => File["${apache::conf_sites}-available/$vhost.conf"], notify => Exec["reload-apache2"], } - file { "${apache::sites}-enabled/$vhost.conf": + file { "${apache::conf_sites}-enabled/$vhost.conf": ensure => absent, notify => Exec["reload-apache2"], } -- cgit v1.2.3