Skip to content

Commit

Permalink
Pet puppet-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
smortex committed Oct 25, 2021
1 parent 3f942cf commit b7cb6f7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
$key_source='https://artifacts.elastic.co/GPG-KEY-elasticsearch'
$description='Elastic package repository.'

case $::osfamily {
case $facts['os']['family'] {
'Debian': {
include apt

Expand Down Expand Up @@ -99,13 +99,13 @@
command => 'yum clean metadata expire-cache --disablerepo="*" --enablerepo="elastic"',
refreshonly => true,
returns => [0, 1],
path => [ '/bin', '/usr/bin', '/usr/local/bin' ],
path => ['/bin', '/usr/bin', '/usr/local/bin'],
cwd => '/',
}
}
'Suse': {
# Older versions of SLES do not ship with rpmkeys
if $::operatingsystem == 'SLES' and versioncmp($::operatingsystemmajrelease, '11') <= 0 {
if $facts['os']['name'] == 'SLES' and versioncmp($facts['os']['release']['major'], '11') <= 0 {
$_import_cmd = "rpm --import ${key_source}"
}
else {
Expand All @@ -116,7 +116,7 @@
command => $_import_cmd,
unless => "test $(rpm -qa gpg-pubkey | grep -i 'D88E42B4' | wc -l) -eq 1",
notify => Zypprepo['elastic'],
path => [ '/bin', '/usr/bin', '/usr/local/bin' ],
path => ['/bin', '/usr/bin', '/usr/local/bin'],
cwd => '/',
}

Expand All @@ -133,12 +133,12 @@
~> exec { 'elastic_zypper_refresh_elastic':
command => 'zypper refresh elastic',
refreshonly => true,
path => [ '/bin', '/usr/bin', '/usr/local/bin' ],
path => ['/bin', '/usr/bin', '/usr/local/bin'],
cwd => '/',
}
}
default: {
fail("\"${module_name}\" provides no repository information for OSfamily \"${::osfamily}\"")
fail("\"${module_name}\" provides no repository information for OSfamily \"${facts['os']['family']}\"")
}
}
}

0 comments on commit b7cb6f7

Please sign in to comment.