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 at
http://groups.google.com/group/puppet-users?hl=en.