All, I am sure this is just something I am doing wrong, but I am trying to implement a node classifier (shell script) to have my nodes inherit the proper classes. However, when I run it I am not getting any classes except those that are defined in default. Rather than going into detail showing all of my configurations right off the bat, I have a question: I just stood up a "development" environment using http://projects.puppetlabs.com/projects/1/wiki/Using_Multiple_Environments as my base. In my puppet.conf on puppetmaster I have cat /etc/puppet.conf [main] <snip> manifest = /etc/puppet/manifests/site.pp modulepath = /etc/puppet/modules [development] manifest = /etc/puppet_devel/manifests/site.pp modulepath = /etc/puppet_devel/modules node_terminus = exec external_nodes = /.foo/bin/puppet_node_classifier.sh In my head that tells the development area to use /etc/puppet_devel and to use the node classifier, whereas the main area uses /etc/ puppet/ and does NOT use the node classifier. My testing shows that if I run ''puppetd --test'' it loads the main area and when I run ''puppetd --test --environment=development'' it loads the development environment. So I think it is working as I expect. Slightly off topic - Do I need to have a puppet.conf in both /etc/ puppet and /etc/puppet_devel? Currently I have a copy of the same file in both locations. However, as far as I can tell it is not using the /.foo/bin/ puppet_node_classifier.sh script for the hosts. If I run ''/.foo/bin/puppet_node_classifier.sh mybox.mydomain'', I get: --- classes: - lockdown Then my config file has: node default { include banners } class lockdown { include restricted } Both banners and restricted are modules in /etc/puppet_devel/modules. It will run banners but it doesn''t run restricted. To make things simple, banners is just putting a file in /etc/motd and restricted is just changing permissions on a different file. How can I tell if puppet is actually even running the node classifier? I tried using --test --debug --trace but the output never shows that it is trying (should it?). Is the output of the classifier whitespace sensitive? Mine is currently ---\n classes:\n <space>-<space>lockdown\n I have gotten things to work fine when I declare hosts specifically, but I want to use the node classifier for automation. I am pretty new to puppet so please forgive me if I have some idiot mistake. If this is all set up correctly and properly running the classifier I''ll bombard this post with the contents of my config files. Thanks in advance Chad -- 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.
Chad
2011-Apr-06 19:16 UTC
[Puppet Users] Re: Node classifier not loading any defined classes
Well I kind of figured it out (though not how I like). I had to move these lines node_terminus = exec external_nodes = /.foo/bin/puppet_node_classifier.sh out of my [development] area into my [main] in puppet.conf. Once I did that I was able to use the external classifier (though I only wanted it in development). -- 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.
Felix Frank
2011-Apr-07 08:13 UTC
Re: [Puppet Users] Re: Node classifier not loading any defined classes
On 04/06/2011 09:16 PM, Chad wrote:> Well I kind of figured it out (though not how I like). > > I had to move these lines > > node_terminus = exec > external_nodes = /.foo/bin/puppet_node_classifier.sh > > out of my [development] area into my [main] in puppet.conf. > > Once I did that I was able to use the external classifier (though I only > wanted it in development).Hi, looking at http://projects.puppetlabs.com/projects/1/wiki/Using_Multiple_Environments, I cannot see any indication that those settings are per-environment. I disbelieve that environments are meant to be independent configuration overrides. They merely provide you with the means to have independent clones of your manifests and modules. Regards, Felix -- 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.
Thomas Bellman
2011-Apr-08 08:51 UTC
Re: [Puppet Users] Re: Node classifier not loading any defined classes
On 2011-04-07 10:13, Felix Frank wrote:> looking at > http://projects.puppetlabs.com/projects/1/wiki/Using_Multiple_Environments, > I cannot see any indication that those settings are per-environment.Indeed, the only way to get per-environment external node classifiers is to have a global wrapper that executes the environment-specific classifier. Pretty silly to not support that, IMHO.> I disbelieve that environments are meant to be independent configuration > overrides. They merely provide you with the means to have independent > clones of your manifests and modules.*Parts* of your modules. You can''t have custom resource types or custom functions per environment. And that sucks. /Bellman -- 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.
Felix Frank
2011-Apr-08 09:09 UTC
Re: [Puppet Users] Re: Node classifier not loading any defined classes
> *Parts* of your modules. You can''t have custom resource types or custom > functions per environment. And that sucks.You can''t? Is there a bug for this that I can vote on? -- 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.
John Warburton
2011-Apr-10 09:46 UTC
Re: [Puppet Users] Re: Node classifier not loading any defined classes
On 8 April 2011 19:09, Felix Frank <felix.frank@alumni.tu-berlin.de> wrote:> > *Parts* of your modules. You can''t have custom resource types or custom > > functions per environment. And that sucks. > > You can''t? Is there a bug for this that I can vote on? > > http://projects.puppetlabs.com/issues/4409-- 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.
Felix Frank
2011-Apr-11 08:00 UTC
Re: [Puppet Users] Re: Node classifier not loading any defined classes
On 04/10/2011 11:46 AM, John Warburton wrote:> On 8 April 2011 19:09, Felix Frank <felix.frank@alumni.tu-berlin.de > <mailto:felix.frank@alumni.tu-berlin.de>> wrote: > > > *Parts* of your modules. You can''t have custom resource types or > custom > > functions per environment. And that sucks. > > You can''t? Is there a bug for this that I can vote on? > > http://projects.puppetlabs.com/issues/4409Thrilling read ;) Voted up - 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.