I''m using external nodes. I wanted to break up the node files into directories based on say, the environment, dev, prod etc. Does puppet set anything besides the host name when it calls the external node script, such as the environment? Are these variables available as environment variables ? Doug -- 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.
You get only the host name from the agent. When I did this using a YAML-based ENC I checked each environment directory in turn for a file matching the hostname and just made sure to only create it in the proper place. On Fri, Dec 30, 2011 at 12:29 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> I''m using external nodes. I wanted to break up the node files into > directories based on say, the environment, dev, prod etc. Does puppet > set anything besides the host name when it calls the external node > script, such as the environment? Are these variables available as > environment variables ? > > Doug > > -- > 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. >-- 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.
Douglas Garstang
2011-Dec-30 20:52 UTC
Re: [Puppet Users] External nodes in different dirs.
Thanks. On Fri, Dec 30, 2011 at 12:51 PM, Aaron Grewell <aaron.grewell@gmail.com> wrote:> You get only the host name from the agent. When I did this using a > YAML-based ENC I checked each environment directory in turn for a file > matching the hostname and just made sure to only create it in the > proper place. > > On Fri, Dec 30, 2011 at 12:29 PM, Douglas Garstang > <doug.garstang@gmail.com> wrote: >> I''m using external nodes. I wanted to break up the node files into >> directories based on say, the environment, dev, prod etc. Does puppet >> set anything besides the host name when it calls the external node >> script, such as the environment? Are these variables available as >> environment variables ? >> >> Doug >> >> -- >> 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. >> > > -- > 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. >-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@gmail.com Cell: +1-805-340-5627 -- 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.
----- Original Message -----> Thanks. > > On Fri, Dec 30, 2011 at 12:51 PM, Aaron Grewell > <aaron.grewell@gmail.com> wrote: > > You get only the host name from the agent. When I did this using a > > YAML-based ENC I checked each environment directory in turn for a > > file matching the hostname and just made sure to only create it in the > > proper place.before calling your ENC it will write out the YAML files for each node in the vardir, so you could load that up and get the current facts - including the environment fact> > > > On Fri, Dec 30, 2011 at 12:29 PM, Douglas Garstang > > <doug.garstang@gmail.com> wrote: > >> I''m using external nodes. I wanted to break up the node files into > >> directories based on say, the environment, dev, prod etc. Does > >> puppet > >> set anything besides the host name when it calls the external node > >> script, such as the environment? Are these variables available as > >> environment variables ? > >> > >> Doug > >> > >> -- > >> 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. > >> > > > > -- > > 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. > > > > > > -- > Regards, > > Douglas Garstang > http://www.linkedin.com/in/garstang > Email: doug.garstang@gmail.com > Cell: +1-805-340-5627 > > -- > 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. > >-- R.I.Pienaar -- 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 isn''t that handy! On Fri, Dec 30, 2011 at 12:57 PM, R.I.Pienaar <rip@devco.net> wrote:> > > ----- Original Message ----- >> Thanks. >> >> On Fri, Dec 30, 2011 at 12:51 PM, Aaron Grewell >> <aaron.grewell@gmail.com> wrote: >> > You get only the host name from the agent. When I did this using a >> > YAML-based ENC I checked each environment directory in turn for a >> > file matching the hostname and just made sure to only create it in the >> > proper place. > > before calling your ENC it will write out the YAML files for each node in > the vardir, so you could load that up and get the current facts - including > the environment fact > > >> > >> > On Fri, Dec 30, 2011 at 12:29 PM, Douglas Garstang >> > <doug.garstang@gmail.com> wrote: >> >> I''m using external nodes. I wanted to break up the node files into >> >> directories based on say, the environment, dev, prod etc. Does >> >> puppet >> >> set anything besides the host name when it calls the external node >> >> script, such as the environment? Are these variables available as >> >> environment variables ? >> >> >> >> Doug >> >> >> >> -- >> >> 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. >> >> >> > >> > -- >> > 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. >> > >> >> >> >> -- >> Regards, >> >> Douglas Garstang >> http://www.linkedin.com/in/garstang >> Email: doug.garstang@gmail.com >> Cell: +1-805-340-5627 >> >> -- >> 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. >> >> > > -- > R.I.Pienaar > > -- > 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. >-- 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.
Douglas Garstang
2011-Dec-31 08:01 UTC
Re: [Puppet Users] External nodes in different dirs.
On Fri, Dec 30, 2011 at 1:58 PM, Aaron Grewell <aaron.grewell@gmail.com> wrote:> Well isn''t that handy!Yeah that''s great.... except that these YAML files are littered with Ruby objects which makes them pretty much impossible to reach with any other programming langauge, like python. Doug. -- 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.
On Sat, Dec 31, 2011 at 00:01, Douglas Garstang <doug.garstang@gmail.com> wrote:> On Fri, Dec 30, 2011 at 1:58 PM, Aaron Grewell <aaron.grewell@gmail.com> wrote: >> Well isn''t that handy! > > Yeah that''s great.... except that these YAML files are littered with > Ruby objects which makes them pretty much impossible to reach with any > other programming langauge, like python.Other than the object tags, and the Ruby symbol tags, none of the content is difficult to represent in another language. We generally advise you disable the "object mapping" part of the YAML parser, and things should more or less just work™. Daniel -- ⎋ Puppet Labs Developer – http://puppetlabs.com ♲ Made with 100 percent post-consumer electrons -- 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.