On Fri, Aug 20, 2010 at 12:50 PM, Gary Larizza <ccshots@gmail.com>
wrote:> In our External Node Classifier script if the node passed isn''t
found, it
> returns a blank YAML block...which is Puppet''s que to look into
our nodes.pp
> file for the node. This is different from returning NOTHING, as it has to
> return a block of YAML with nothing in it - in Ruby it looks like this
(for
> us, at least):
> default = {''classes'' => []}
> print default.to_yaml
> Are you returning an empty YAML block in your External Node Classifer
script
> when Puppet should look to your config files (as opposed to the External
> Node Classifier script) for the node information? If so, I''d say
this might
> be a bug.
> -Gary
Yeah. I think I forgot that your supposed to return a blank yaml block
if the external node script can''t find the node, which then imforms
puppet to go look at the files. Probably because that''s not documented
anywhere. So, I fixed that, and now, I have this in
/etc/puppet/puppet.conf:
external_nodes = /etc/puppet/getnode
node_terminus = exec
and an external node in
/etc/puppet/manifests/extdata/app01.foo.com.yaml, which contains:
---
XXX
classes:
- facility::paloalto
- hardware::vmware
- function::appServer
- elements::tfel0
xenvironment: production
parameters:
node_ldap_groupdn: cn=ops,ou=groups,dc=foo,dc=com
yes, with bogus data. There''s an extraneous ''XXX''
there and
environment has an ''x'' prefixed to the front. Puppet
isn''t finding it,
it seems because the client is just logging:
Aug 20 20:08:09 s_sys@app01.foo.com puppet-agent[14873]: Starting
Puppet client version 2.6.0
Aug 20 20:08:09 s_sys@app01.foo.com puppet-agent[14873]: Finished
catalog run in 0.03 seconds
and when I run the script manually, I get:
prov01 /etc/puppet/manifests/extdata:# /etc/puppet/getnode app01.foo.com
---
XXX
classes:
- facility::paloalto
- hardware::vmware
- function::appServer
- elements::tfel0
xenvironment: production
parameters:
node_ldap_groupdn: cn=ops,ou=groups,dc=foo,dc=com
So... something is borked with puppet and I don''t know what. *sigh*
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.