diff options
author | Thomas Backlund <tmb@mageia.org> | 2015-10-20 00:32:57 +0300 |
---|---|---|
committer | Thomas Backlund <tmb@mageia.org> | 2015-10-20 00:32:57 +0300 |
commit | 6a9988b82160f4f516ceb36b48acdd8f49458659 (patch) | |
tree | 29dada269ac53fde5cb5079d5e6e008d9e6c4dbe /modules/facter | |
parent | 462e0e2ffd1ee64785307048d7aafd27bf9a4fc4 (diff) | |
download | puppet-6a9988b82160f4f516ceb36b48acdd8f49458659.tar puppet-6a9988b82160f4f516ceb36b48acdd8f49458659.tar.gz puppet-6a9988b82160f4f516ceb36b48acdd8f49458659.tar.bz2 puppet-6a9988b82160f4f516ceb36b48acdd8f49458659.tar.xz puppet-6a9988b82160f4f516ceb36b48acdd8f49458659.zip |
lint fixes for facter
Diffstat (limited to 'modules/facter')
-rw-r--r-- | modules/facter/lib/facter/dc_suffix.rb | 4 | ||||
-rw-r--r-- | modules/facter/lib/facter/lib_dir.rb | 4 | ||||
-rw-r--r-- | modules/facter/lib/facter/wildcard_sslcert.rb | 28 | ||||
-rw-r--r-- | modules/facter/spec/spec_helper.rb | 1 |
4 files changed, 18 insertions, 19 deletions
diff --git a/modules/facter/lib/facter/dc_suffix.rb b/modules/facter/lib/facter/dc_suffix.rb index a8526978..c480e3ac 100644 --- a/modules/facter/lib/facter/dc_suffix.rb +++ b/modules/facter/lib/facter/dc_suffix.rb @@ -2,9 +2,9 @@ Facter.add("dc_suffix") do setcode do begin Facter.domain - rescue + rescue Facter.loadfacts() end dc_suffix = 'dc=' + Facter.value('domain').gsub('.',',dc=') end -end +end diff --git a/modules/facter/lib/facter/lib_dir.rb b/modules/facter/lib/facter/lib_dir.rb index fe7d6a31..f612ed7e 100644 --- a/modules/facter/lib/facter/lib_dir.rb +++ b/modules/facter/lib/facter/lib_dir.rb @@ -2,9 +2,9 @@ Facter.add("lib_dir") do setcode do begin Facter.architecture - rescue + rescue Facter.loadfacts() end '/usr/lib' + ( Facter.value('architecture') == "x86_64" ? '64' : '') + '/' end -end +end diff --git a/modules/facter/lib/facter/wildcard_sslcert.rb b/modules/facter/lib/facter/wildcard_sslcert.rb index 1f7c4dd7..093982d9 100644 --- a/modules/facter/lib/facter/wildcard_sslcert.rb +++ b/modules/facter/lib/facter/wildcard_sslcert.rb @@ -1,16 +1,16 @@ Facter.add("wildcard_sslcert") do - setcode do - begin - Facter.domain - rescue - Facter.loadfacts() - end - sslfiles = '/etc/ssl/wildcard.' + Facter.value('domain') - if File.exist?(sslfiles + '.crt') and File.exist?(sslfiles + '.key') \ - and File.exist?(sslfiles + '.pem') - 'true' - else - 'false' - end - end + setcode do + begin + Facter.domain + rescue + Facter.loadfacts() + end + sslfiles = '/etc/ssl/wildcard.' + Facter.value('domain') + if File.exist?(sslfiles + '.crt') and File.exist?(sslfiles + '.key') \ + and File.exist?(sslfiles + '.pem') + 'true' + else + 'false' + end + end end diff --git a/modules/facter/spec/spec_helper.rb b/modules/facter/spec/spec_helper.rb index 81d9f79b..ec3fe615 100644 --- a/modules/facter/spec/spec_helper.rb +++ b/modules/facter/spec/spec_helper.rb @@ -32,4 +32,3 @@ RSpec.configure do |config| to_remove.each {|key| ENV.delete key } end end - |