custom: Lint fixes
This commit is contained in:
parent
f70c8572a5
commit
24b8eef4a2
1 changed files with 6 additions and 4 deletions
|
@ -1,10 +1,11 @@
|
||||||
|
# Custom default settings.
|
||||||
|
#
|
||||||
class custom {
|
class custom {
|
||||||
|
|
||||||
file { "/srv":
|
file { "/srv":
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
mode => "0755",
|
mode => "0755",
|
||||||
owner => root,
|
owner => "root",
|
||||||
group => $::operatingsystem ? {
|
group => $::operatingsystem ? {
|
||||||
OpenBSD => wheel,
|
OpenBSD => wheel,
|
||||||
default => root,
|
default => root,
|
||||||
|
@ -45,10 +46,10 @@ class custom {
|
||||||
# source => "http://puppetlabs.com/downloads/puppet/puppet-2.6.2.tar.gz",
|
# 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')
|
$test = regsubst($source, '^([^:]+)://.+$', '\1')
|
||||||
if "${test}" == "${source}" {
|
if $test == $source {
|
||||||
$method = "file"
|
$method = "file"
|
||||||
$path = $source
|
$path = $source
|
||||||
} else {
|
} else {
|
||||||
|
@ -60,6 +61,7 @@ define custom::file($ensure, $group="NONE", $mode="NONE", $owner="NONE", $seltyp
|
||||||
$fetch_cmd = "wget -q -O '${name}' '${source}'"
|
$fetch_cmd = "wget -q -O '${name}' '${source}'"
|
||||||
$diff_cmd = "wget -N --spider '${source}' 2>&1 | fgrep 'Server file no newer than local file'"
|
$diff_cmd = "wget -N --spider '${source}' 2>&1 | fgrep 'Server file no newer than local file'"
|
||||||
}
|
}
|
||||||
|
default: { }
|
||||||
}
|
}
|
||||||
|
|
||||||
case $method {
|
case $method {
|
||||||
|
|
Loading…
Add table
Reference in a new issue