Class: Puppet::Provider::KatelloSslTool::CertFile

Inherits:
Puppet::Provider
  • Object
show all
Defined in:
lib/puppet/provider/katello_ssl_tool.rb

Instance Method Summary collapse

Instance Method Details

#createObject



191
192
193
# File 'lib/puppet/provider/katello_ssl_tool.rb', line 191

def create
  File.open(resource[:path], "w", mode) { |f| f << expected_content_processed }
end

#destroyObject



195
196
197
# File 'lib/puppet/provider/katello_ssl_tool.rb', line 195

def destroy
  File.delete(resource[:path]) if File.exist?(resource[:path])
end

#exists?Boolean

Returns:

  • (Boolean)


185
186
187
188
189
# File 'lib/puppet/provider/katello_ssl_tool.rb', line 185

def exists?
  return false unless File.exists?(resource[:path])
  return false unless File.exists?(source_path)
  expected_content_processed == current_content
end