custom: Lint fixes

This commit is contained in:
Ossi Salmi 2014-08-15 23:47:49 +03:00
parent f70c8572a5
commit 24b8eef4a2

View file

@ -1,10 +1,11 @@
# Custom default settings.
#
class custom {
file { "/srv":
ensure => directory,
mode => "0755",
owner => root,
owner => "root",
group => $::operatingsystem ? {
OpenBSD => wheel,
default => root,
@ -45,10 +46,10 @@ class custom {
# source => "http://puppetlabs.com/downloads/puppet/puppet-2.6.2.tar.gz",
# }
#
define custom::file($ensure, $group="NONE", $mode="NONE", $owner="NONE", $seltype="NONE", $source) {
define custom::file($ensure, $source, $group="NONE", $mode="NONE", $owner="NONE", $seltype="NONE") {
$test = regsubst($source, '^([^:]+)://.+$', '\1')
if "${test}" == "${source}" {
if $test == $source {
$method = "file"
$path = $source
} else {
@ -60,6 +61,7 @@ define custom::file($ensure, $group="NONE", $mode="NONE", $owner="NONE", $seltyp
$fetch_cmd = "wget -q -O '${name}' '${source}'"
$diff_cmd = "wget -N --spider '${source}' 2>&1 | fgrep 'Server file no newer than local file'"
}
default: { }
}
case $method {