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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to