Mercurial > repos > other > Puppet
diff modules/concat/manifests/fragment.pp @ 36:37675581a273 puppet-3.6
Update Puppet module for Apache (pulls in concat module)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 14 Mar 2015 20:07:04 +0000 |
parents | 956e484adc12 |
children | d9352a684e62 |
line wrap: on
line diff
--- a/modules/concat/manifests/fragment.pp Sat Mar 14 20:01:17 2015 +0000 +++ b/modules/concat/manifests/fragment.pp Sat Mar 14 20:07:04 2015 +0000 @@ -28,7 +28,7 @@ $target, $content = undef, $source = undef, - $order = 10, + $order = '10', $ensure = undef, $mode = undef, $owner = undef, @@ -40,7 +40,9 @@ if !(is_string($source) or is_array($source)) { fail('$source is not a string or an Array.') } - validate_string($order) + if !(is_string($order) or is_integer($order)) { + fail('$order is not a string or integer.') + } if $mode { warning('The $mode parameter to concat::fragment is deprecated and has no effect') } @@ -54,12 +56,12 @@ warning('The $backup parameter to concat::fragment is deprecated and has no effect') } if $ensure == undef { - $_ensure = getparam(Concat[$target], 'ensure') + $my_ensure = concat_getparam(Concat[$target], 'ensure') } else { if ! ($ensure in [ 'present', 'absent' ]) { warning('Passing a value other than \'present\' or \'absent\' as the $ensure parameter to concat::fragment is deprecated. If you want to use the content of a file as a fragment please use the $source parameter.') } - $_ensure = $ensure + $my_ensure = $ensure } include concat::setup @@ -78,18 +80,18 @@ # be paranoid and only allow the fragment's file resource's ensure param to # be file, absent, or a file target - $safe_ensure = $_ensure ? { + $safe_ensure = $my_ensure ? { '' => 'file', undef => 'file', 'file' => 'file', 'present' => 'file', 'absent' => 'absent', - default => $_ensure, + default => $my_ensure, } # if it looks line ensure => /target syntax was used, fish that out - if ! ($_ensure in ['', 'present', 'absent', 'file' ]) { - $ensure_target = $_ensure + if ! ($my_ensure in ['', 'present', 'absent', 'file' ]) { + $ensure_target = $my_ensure } else { $ensure_target = undef } @@ -115,6 +117,7 @@ source => $source, content => $content, backup => false, + replace => true, alias => "concat_fragment_${name}", notify => Exec["concat_${target}"] }