diff --git a/lib/puppet/provider/ca/katello_ssl_tool.rb b/lib/puppet/provider/ca/katello_ssl_tool.rb index 053c146d..b6a099ad 100644 --- a/lib/puppet/provider/ca/katello_ssl_tool.rb +++ b/lib/puppet/provider/ca/katello_ssl_tool.rb @@ -40,7 +40,7 @@ def existing_pubkey end def deploy! - if File.exists?(rpmfile) + if File.exist?(rpmfile) # the rpm is available locally on the file system rpm('-Uvh', '--force', rpmfile) else diff --git a/lib/puppet/provider/katello_ssl_tool.rb b/lib/puppet/provider/katello_ssl_tool.rb index 7f503db3..41d24422 100644 --- a/lib/puppet/provider/katello_ssl_tool.rb +++ b/lib/puppet/provider/katello_ssl_tool.rb @@ -59,7 +59,7 @@ def generate! def generate? return false unless resource[:generate] return true if resource[:regenerate] - return true if File.exists?(update_file) + return true if File.exist?(update_file) return files_to_generate.any? { |file| ! File.exist?(file) } end @@ -79,7 +79,7 @@ def files_to_deploy end def deploy! - if File.exists?(rpmfile) + if File.exist?(rpmfile) if(system("rpm -q #{rpmfile_base_name} &>/dev/null")) rpm('-e', rpmfile_base_name) end @@ -91,7 +91,7 @@ def deploy! end def needs_deploy? - if File.exists?(rpmfile) + if File.exist?(rpmfile) # the installed version doesn't match the rpmfile !system("rpm --verify -p #{rpmfile} &>/dev/null") else @@ -177,8 +177,8 @@ class CertFile < Puppet::Provider commands :openssl => 'openssl' def exists? - return false unless File.exists?(resource[:path]) - return false unless File.exists?(source_path) + return false unless File.exist?(resource[:path]) + return false unless File.exist?(source_path) expected_content_processed == current_content end diff --git a/lib/puppet/provider/key_bundle/katello_ssl_tool.rb b/lib/puppet/provider/key_bundle/katello_ssl_tool.rb index ed3c950d..61838731 100644 --- a/lib/puppet/provider/key_bundle/katello_ssl_tool.rb +++ b/lib/puppet/provider/key_bundle/katello_ssl_tool.rb @@ -3,9 +3,9 @@ Puppet::Type.type(:key_bundle).provide(:katello_ssl_tool, :parent => Puppet::Provider::KatelloSslTool::CertFile) do def exists? - return false unless File.exists?(resource[:path]) - return false unless File.exists?(privkey_source_path) - return false unless File.exists?(pubkey_source_path) + return false unless File.exist?(resource[:path]) + return false unless File.exist?(privkey_source_path) + return false unless File.exist?(pubkey_source_path) expected_content_processed == current_content end