zend-patterns / ZendServerPuppet

ZendServerPuppet
Apache License 2.0
6 stars 16 forks source link

Puppet 4 is more strict with facts scripts #60

Open ubellavance opened 7 years ago

ubellavance commented 7 years ago

When I tested the module with Puppet 4, it wouldn't work. I can't remember exactly but it's either because php is not present when called first (that is why I rewrote some scripts in python) or because the scripts returned nothing.

There must be a way to comply by doing an if file exists then run the API call, if not return what Puppet would like.

@mkherlakian Please assign the puppet4 label

ubellavance commented 7 years ago

It's because the interpreter in the shebang doesn't exist on the first puppet run. Logs:

Error: Facter: error while processing "/opt/puppetlabs/puppet/cache/facts.d/get_application_details.php" for external facts: child process returned non-zero exit status (2).
Error: Facter: error while processing "/opt/puppetlabs/puppet/cache/facts.d/get_vhost_details.php" for external facts: child process returned non-zero exit status (2).
Error: Facter: error while processing "/opt/puppetlabs/puppet/cache/facts.d/get_library_details.php" for external facts: child process returned non-zero exit status (2).

I think the only solution is to write them in a language that is installed by default on all distros... most likely python.