Project

General

Profile

Actions

Refactor #1112

closed

ENC - Self signed certificates

Added by Craig White over 12 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

suggested modifications for extras/puppet/foreman/files/external_node.rb

--- external_node.rb 2011-08-03 09:52:34.287126938 -0700
++ new_external_node.rb 2011-08-15 08:55:50.591256868 -0700
@ -62,9 +62,18 @
def enc
foreman_url = "#{url}/node/#{certname}?format=yml"
uri = URI.parse(foreman_url)

+ # comment the next 2 lines if you need to use self-signed certificates
req = Net::HTTP::Get.new(foreman_url)
res = Net::HTTP.start(uri.host, uri.port) { |http| http.request(req) }

+ # uncomment the next 5 lines if you need to use self-signed certificate
+ # https = Net::HTTP.new(uri.host, uri.port)
+ # https.use_ssl = true
+ # https.verify_mode = OpenSSL::SSL::VERIFY_NONE
+ # req = Net::HTTP::Get.new(foreman_url)
+ # res = https.request(req)
+
raise "Error retrieving node #{certname}: #{res.class}" unless res.code == "200"
res.body
end

Actions #1

Updated by Ohad Levy over 12 years ago

any chance you want to send it as a git patch or github pull request?

thanks!

Actions #2

Updated by Craig White over 12 years ago

If I knew how...

  1. cd /var/www/foreman/
  2. git format-patch origin/develop --stdout #
  1. git status extras/puppet/foreman/files/*
  2. On branch develop
  3. Your branch is behind 'origin/develop' by 43 commits, and can be fast-forwarded. #
    nothing to commit (working directory clean)
Actions #3

Updated by Benjamin Papillon almost 11 years ago

  • Status changed from New to Closed

The script has been refactored to node.rb taking into account the PuppetCA certificates.
Feel free to reopen the ticket if it is not matching your needs.

Actions

Also available in: Atom PDF