gather information on the client hosts.
However, I've run into a problem when trying to get the deployed apache
version for some of the hosts.
My custom fact script is as follows:
if File.exist? '/bin/httpd'
Facter::Util::Resolution.exec('/bin/httpd -v |
/usr/local/bin/grep version | /usr/bin/cut -d: -f2 | /usr/bin/tr -d " "')
For some of the hosts, the /bin/httpd invocation will give the following
error: ld.so.1: httpd: fatal: libssl.so.0.9.8: open failed: No such file or
This same command runs without issues on a regular (bash) shell.
This is usually indicative of a bad/missing LD_LIBRARY_PATH environment
variable. It seems that the Facter::Util::Resolution.exec invocation will
spawn a new /usr/bin/sh shell session, with very few environment variables
set (LD_LIBRARY_PATH is not one of them).
Cross-checking with working hosts shows no differences, I inclusively have
a different facter script that reports the output of 'env' and it's similar
for both working and non-working hosts.
Has anyone had a similar issue, or has any idea of how to investigate
further/work around the problem. Is there a way to explicitly set
environment variables on Facter::Util::Resolution.exec invocations?
I suspect that the cause for the different behaviours may not be caused by
puppet/facter, but by some environmental (OS, shell, apache) issue.
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/RPfPJssVWncJ.
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to email@example.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.