Well I got foreman.rb to work with https. Look at this thread: http://groups.google.com/group/puppet-users/browse_thread/thread/1d2b5814a73300d/5907d3697c63853c?lnk=gst&q=foreman.rb#5907d3697c63853c
I'd like to know what the deal is with node.rb.... I hope I'm doing something wrong, and that this is not a limitation.. :) On Jun 17, 9:06 pm, Mohamed Lrhazi <[email protected]> wrote: > I think I have the same problem.... the scripts bundled with foreman, > those that talk to the web interface, do not seem to support https... > I set up an apache virtual on localhost with ssl disabled and > configured these scripts to speak to that. that seems to do it. > > Can someone confirm this limitation or are these scripts supposed to > work with both http and https. > The scripts am referring to are: node.rb, push_facts.rb and foreman.rb > (reports) > > Thanks a lot. > Mohamed. > > > > On Thu, Jun 17, 2010 at 11:44 AM, CraftyTech <[email protected]> wrote: > > Hello Ohad, > > > I started it with webrick on port 80, and it appears to work. > > This what I get when I run the command /etc/puppet/external_node.rb > > host: > > > --- > > parameters: > > puppetmaster: puppet > > classes: [] > > > environment: "" > > > Does that mean it works on webrick but not on apache/passenger:443? > > > On Jun 17, 11:00 am, Ohad Levy <[email protected]> wrote: > >> Just to be on the safe side, does it work if you use it with http (instead > >> of https)? > >> additionally, you should be using it with fqdn as the parameter (e.g. > >> /etc/puppet/external_node.rb fqdn ) > > >> Ohad > > >> On Thu, Jun 17, 2010 at 10:48 PM, CraftyTech <[email protected]> wrote: > >> > Hello All, > > >> > I'm trying to start using external nodes under foreman, and I'm > >> > running into some issues. I have the entries in puppet.conf: > > >> > [main] > >> > external_nodes = /etc/puppet/external_node.rb > >> > node_terminus = exec > > >> > The enternal_node.rb script is the one that came with foreman: > > >> > #!/usr/bin/ruby > >> > # a simple script which fetches external nodes from Foreman > >> > # you can basically use anything that knows how to get http data, e.g. > >> > wget/curl etc. > > >> > # Foreman url > >> > foreman_url="https://hostname:443" > > >> > require 'net/http' > > >> > foreman_url += "/node/#{ARGV[0]}?format=yml" > >> > url = URI.parse(foreman_url) > >> > req = Net::HTTP::Get.new(foreman_url) > >> > res = Net::HTTP.start(url.host, url.port) { |http| > >> > http.request(req) > >> > } > > >> > case res > >> > when Net::HTTPOK > >> > puts res.body > >> > else > >> > $stderr.puts "Error retrieving node %s: %s" % [ARGV[0], res.class] > >> > end > > >> > ########################################################################## > > >> > When I run it against a node, which I already took off the internal > >> > node definitions, I get the following error: > > >> > /etc/puppet/external_node.rb hostname > >> > /usr/lib/ruby/1.8/net/http.rb:2022:in `read_status_line': wrong status > >> > line: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN > >> > \">" (Net::HTTPBadResponse) > >> > from /usr/lib/ruby/1.8/net/http.rb:2009:in `read_new' > >> > from /usr/lib/ruby/1.8/net/http.rb:1050:in `request' > >> > from /etc/puppet/external_node.rb:14 > >> > from /usr/lib/ruby/1.8/net/http.rb:543:in `start' > >> > from /usr/lib/ruby/1.8/net/http.rb:440:in `start' > >> > from /etc/puppet/external_node.rb:13 > > >> > I went over the documentation meticulously before posting, but > >> > obviously I'm still missing something. Can anyone shed some light on > >> > this? > > >> > Thanks, > > >> > -- > >> > You received this message because you are subscribed to the Google Groups > >> > "Puppet Users" group. > >> > To post to this group, send email to [email protected]. > >> > To unsubscribe from this group, send email to > >> > [email protected]<puppet-users%[email protected]> > >> > . > >> > For more options, visit this group at > >> >http://groups.google.com/group/puppet-users?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Puppet Users" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/puppet-users?hl=en. > > -- > " Logic merely sanctions the conquests of the intuition." > Jacques Hadamard -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
