Comment 8 for bug 1076286

Revision history for this message
Matthaus Owens (matthaus-m) wrote :

I wasn't able to reproduce this on precise. I used the following manifest to test the fact:

node default {
  file { '/tmp/puppettest':
    ensure => present,
    content => $test_fact,
  }
}

I had just the fact example you used in (/etc/puppet/modules/modulewithfact/lib/facter/test_fact.rb)...

Facter.add(:test_fact) do
  confine :kernel => "Linux"
  setcode do
        "Content from the fact"
  end
end

The puppet run was as follows...

puppet agent -t
info: Loading facts in /etc/puppet/modules/modulewithfact/lib/facter/test_fact.rb
info: Caching catalog for precise-64.localdomain
info: Applying configuration version '1353888521'
notice: /Stage[main]//Node[default]/File[/tmp/puppettest]/ensure: created
notice: Finished catalog run in 0.02 seconds

And the content was as expected.

cat /tmp/puppettest
Content from the fact