Paulo Pinto
2014-Apr-29 19:48 UTC
[Puppet Users] Custom facts variables coming out empty on manifest
Hi all. I have a very simple Custom Fact in /etc/puppet/modules/facts/lib/facter/php_version.rb : Facter.add(:php_version) do setcode do Facter::Util::Resolution.exec('php-config --version|awk -F "." \'{print $1$2}\'') end end It gets deployed and if I run "facter -p |grep php " on the "slave" server I get: php_version => 54 Now, if I try to use the variable on my manifest like this: file { "/usr/local/lib/php.ini": owner => root, group => root, mode => 0644, source => "puppet:///files/php${::php_version}.ini", require => Exec['install_cpanel'] } I always get on the "slave" log : (/Stage[main]/Cpanel::Cpanel/File[/usr/local/lib/php.ini]) Could not evaluate: Could not retrieve information from environment production source(s) puppet:///files/php.ini As it is obvious, it's not replacing the variable ${::php_version} as it should return php54.ini and not php.ini . What am I doing wrong here ? Best regards, -- Paulo -- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/89d00ab1-018a-447f-a95f-3b804b25c85c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.