I am having a great deal of trouble using a custom fact in a module and I am
hoping someone can help me out.
I am using facter-1.5.0-2.el4 and puppet-0.24.5-1.el4. I know these are
really old versions.
The custom fact is defined using an environmental variable
export FACTER_VERTICAL="dev fit"
and I can see the fact in the output of facter
[xxxxx ~]# facter | grep -i vertical
vertical => dev fit
In the module I am trying to use the fact in the following way
file { "/etc/yum.repos.d/env32-envision.repo":
ensure => present,
mode => 0664,
owner => root,
group => root,
content => $vertical ? {
"dev fit" =>
template("ads_yum2/env32-dev-fit.repo.erb"),
default =>
template("ads_yum2/env32-dev-staging.repo.erb"),
require => File["/etc/yum.repos.d/base_os.repo"],
}
}
When I restart puppet the output is the default option instead of the "dev
fit" option. If I run puppet interactively "puppetd --debug --test" I get
the correct output based on the custom fact. I understand that puppet will
not inherent environmental variables but since the fact is present I thought
this approach would work. Am I wrong?
I have been banging my head against the wall over this for some time. I
appreciate any input.
Thanks
Ed
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.