Hello, I have the following use case: For a custom class/type I need to know which php_version is installed on the machine. So I wrote a custom fact like this:
Facter.add('php_version') do setcode do Facter::Util::Resolution.exec('/usr/bin/php -i | /bin/egrep -e "^PHP Version" | /usr/bin/head -n 1 | /usr/bin/cut -d " " -f 4 | /usr/bin/cut -d "-" -f 1') end end It works great. Except: When php is not yet installed (there is a Package['php'] definition, too). Then it will return an empty string. Thus I have to run puppet two times to get the expected result. I am sure that this is expected behavior of puppet. How do I handle such case? Regards Jan -- http://dracoblue.net -- 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/CABJ-%3Ds%2BbSkXD1rKUwKxkFQMCeQ4JP8PG3hPh1q0bTUQCadDshw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.