Skip to content

Commit

Permalink
Respect build_dir from resource
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Oct 10, 2023
1 parent 164fac0 commit 2dbbd37
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
4 changes: 0 additions & 4 deletions lib/puppet/provider/ca/katello_ssl_tool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,4 @@ def files_to_deploy
[pubkey]
end

def self.privkey(name)
build_path("#{name}.key")
end

end
2 changes: 1 addition & 1 deletion lib/puppet/provider/cert/katello_ssl_tool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ def req_file
end

def build_path(file_name = '')
self.class.build_path(File.join(resource[:hostname], file_name))
self.class.build_path(File.join(resource[:hostname], file_name), resource[:build_dir])
end
end
10 changes: 4 additions & 6 deletions lib/puppet/provider/katello_ssl_tool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ def self.privkey(name)
protected

def katello_ssl_tool(*args)
Dir.chdir('/root') do
katello_ssl_tool_command(*args)
end
katello_ssl_tool_command(*args)
end

def generate!
Expand Down Expand Up @@ -154,11 +152,11 @@ def self.target_path(file_name = '')
end

def build_path(file_name = '')
self.class.build_path(file_name)
self.class.build_path(file_name, resource[:build_dir])
end

def self.build_path(file_name = '')
File.join("/root/ssl-build", file_name)
def self.build_path(file_name = '', build_dir)
File.join(build_dir, file_name)
end

def ca_details
Expand Down

0 comments on commit 2dbbd37

Please sign in to comment.