(root)@puppetmaster:~# cat /etc/puppet/puppet.conf
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
external_nodes = /usr/local/bin/external.sh
node_terminus = exec


(root)@puppetmaster:~# cat /usr/local/bin/external.sh
#/bin/bash
# puppet classifier

grep -w "$1" /etc/puppet/SITEs/*/hosts |
        awk -F/ '{printf "---\nclasses:\n - %s\n", $5}'
echo " - stb"


(root)@puppetmaster:~# /usr/local/bin/external.sh nvcp07.example.net
---
classes:
 - den-nms
 - stb


puppet client says this

Aug 23 04:11:51 nvcp07.example.net puppetd[17887]: [ID 702911
daemon.error] Could not retrieve catalog: Could not find node
'nvcp07.example.net'; cannot compile



puppetmaster says this

debug: Allowing authenticated client nvcp07.example.net(192.168.0.135)
access to puppetmaster.getconfig
debug: Our client is remote
info: Expiring the node cache of nvcp07.example.net
info: Not using expired node for nvcp07.example.net from cache;
expired at Sun Aug 23 00:34:14 -0400 2009
debug: Executing '/usr/local/bin/external.sh nvcp07.example.net'
err: Could not call: Could not find node 'nvcp07.example.net'; cannot compile

why?

on puppetmaster when I run it manually it works fine

# /usr/local/bin/external.sh nvcp07.example.net
---
classes:
 - den-nms
 - stb


-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

--~--~---------~--~----~------------~-------~--~----~
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