On Wednesday, October 7, 2015 at 9:07:53 AM UTC-5, Richard Rechenberg wrote: > > Hello Puppet Users, > > for handling my different environments I'am using directory environments. > Every environment has its own node definiton stored in the nodes.pp. For > only one of the environments I want to use an ENC. Caused by this I added > the following inside the masters puppet.conf: > > node_terminus = exec >> external_nodes = /opt/getClasses.sh >> > > Using this configuration only the environment which nodes are known by the > ENC get ther configuration all other nodes which are still stored inside > node.pp files only get a 404 error. > > Has someone done this mix before? > >
If you configure an ENC on the master, it will be consulted for every catalog request, and it must return a valid result and exit with a success code (0). That output can be devoid of data, but it must be provided for every node. If there is also a node block for any node, then every node must have a corresponding node block, (even if it is a default node block). Classification information from an ENC, if any, is merged with classification data from the appropriate node block, if any, as described in the ENC general documentation <https://docs.puppetlabs.com/guides/external_nodes.html>. The bottom line is that if your master is going to use an ENC for some clients and node blocks for some clients, then it will expect to use both classification approaches together for all clients. It is trivial to back up an ENC with an empty default node block to pick up clients that don't otherwise have a matching node block. How you get your ENC to provide empty responses for nodes it doesn't otherwise want to classify depends on your ENC, but if there's no better alternative then you should be able to wrap the real ENC in a script that handles it. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/ba51ed13-2f60-4d71-9cb4-d483f275875b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.