Some things to keep in mind for successful ENC scripts...

First, on the agent, run:

# facter fqdn

This is the node name that will be reported to the puppet master 
(equivalent to 'hostname -f').  If it doesn't match expectations, fix that 
first-- preferably via DNS, but /etc/hosts is a valid solution if necessary.

Other thing(s) to make sure of with your ENC code:

  * don't output any text that isn't YAML
  * don't return any exit code other than 0, unless you want your puppet 
runs to halt on ENC error
  * Don't use tabs when generating your yaml.  ;)

That means any debug text needs to go to stderr (or a log file), and you 
need exception handlers for everything.

And in the "probably obvious" category, I construct one large data 
structure in memory containing all the output I want in my YAML, and then 
dump that structure via a YAML library, rather than trying to format the 
output myself.

-- 
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/379a62f8-1727-43ba-85b9-cc1c6bd22427%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to