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 puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 <hmmedina@gmail.com> 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 puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > 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 puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 <ohadl...@gmail.com> 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 <hmmed...@gmail.com> 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 puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to > > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > > . > > 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 puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 <hmmedina@gmail.com> 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 <ohadl...@gmail.com> 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 <hmmed...@gmail.com> 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 puppet-users@googlegroups.com. >> > To unsubscribe from this group, send email to >> > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> >> > . >> > 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 puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://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 puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 <lrh...@gmail.com> 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 <hmmed...@gmail.com> 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 <ohadl...@gmail.com> 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 <hmmed...@gmail.com> 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 puppet-users@googlegroups.com. > >> > To unsubscribe from this group, send email to > >> > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > >> > . > >> > 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 puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > > 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 puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
that is not a limitation, and usually actually works :) can you check that you get the right output with curl/wget - e.g.? curl -k https://foreman/node/fqdn?format=yml (add -x "" to disable curl using a proxy) Ohad On Fri, Jun 18, 2010 at 9:28 AM, CraftyTech <hmmedina@gmail.com> wrote:> 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 <lrh...@gmail.com> 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 <hmmed...@gmail.com> 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 <ohadl...@gmail.com> 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 <hmmed...@gmail.com> > 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 puppet-users@googlegroups.com. > > >> > To unsubscribe from this group, send email to > > >> > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > <puppet-users%2Bunsubscribe@googlegroups.com<puppet-users%252Bunsubscribe@googlegroups.com> > > > > >> > . > > >> > 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 puppet-users@googlegroups.com. > > > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > > > 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 puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > 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 puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
It looks like it''s working now.... This is what I get when I click on yaml ... --- parameters: puppetmaster: puppet classes: [] environment: "" It doesn''t let me edit it thought... It seems to be static.. On Jun 17, 9:54 pm, Ohad Levy <ohadl...@gmail.com> wrote:> that is not a limitation, and usually actually works :) > > can you check that you get the right output with curl/wget - e.g.? > > curl -khttps://foreman/node/fqdn?format=yml(add -x "" to disable curl > using a proxy) > > Ohad > > On Fri, Jun 18, 2010 at 9:28 AM, CraftyTech <hmmed...@gmail.com> wrote: > > Well I got foreman.rb to work with https. Look at this thread: > > >http://groups.google.com/group/puppet-users/browse_thread/thread/1d2b... > > > 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 <lrh...@gmail.com> 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 <hmmed...@gmail.com> 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 <ohadl...@gmail.com> 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 <hmmed...@gmail.com> > > 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 puppet-users@googlegroups.com. > > > >> > To unsubscribe from this group, send email to > > > >> > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > > <puppet-users%2Bunsubscribe@googlegroups.com<puppet-users%252Bunsubscribe@googlegroups.com> > > > > >> > . > > > >> > 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 puppet-users@googlegroups.com. > > > > To unsubscribe from this group, send email to > > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > > . > > > > 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 puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to > > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > > . > > 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 puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.