The first example was master and agent on the same machine, so it found the module in the modulepath without pluginsync. The second example was agent and master on different machines.
Can you post the output of your puppet.conf and `puppet agent -t --trace --debug` on the agent? That might help figure out what's going on.
# Puppet Run
root@lucid-64:~# puppet agent -t
info: Retrieving plugin
notice: /File[/var/lib/puppet/lib/facter]/ensure: created
notice: /File[/var/lib/puppet/lib/facter/test_fact.rb]/ensure: defined content as '{md5}fc59074ecb5d02756ee6c2095677bb92'
info: Loading downloaded plugin /var/lib/puppet/lib/facter/test_fact.rb
info: Loading facts in /var/lib/puppet/lib/facter/test_fact.rb
info: Caching catalog for lucid-64.localdomain
info: Applying configuration version '1352931741'
notice: /Stage[main]//Node[default]/File[/tmp/puppettest]/ensure: created
notice: Finished catalog run in 0.03 seconds
# Correct content in file
root@lucid-64:~# cat /tmp/puppettest
Content from the fact
Andrea,
The first example was master and agent on the same machine, so it found the module in the modulepath without pluginsync. The second example was agent and master on different machines.
Can you post the output of your puppet.conf and `puppet agent -t --trace --debug` on the agent? That might help figure out what's going on.
Here is the output from that second run.
# Cleanup puppet/ lib/
root@lucid-64:~# rm -rf /tmp/puppettest
root@lucid-64:~# rm -rf /var/lib/
# Puppet Run var/lib/ puppet/ lib/facter] /ensure: created var/lib/ puppet/ lib/facter/ test_fact. rb]/ensure: defined content as '{md5}fc59074ec b5d02756ee6c209 5677bb92' puppet/ lib/facter/ test_fact. rb puppet/ lib/facter/ test_fact. rb localdomain main]// Node[default] /File[/ tmp/puppettest] /ensure: created
root@lucid-64:~# puppet agent -t
info: Retrieving plugin
notice: /File[/
notice: /File[/
info: Loading downloaded plugin /var/lib/
info: Loading facts in /var/lib/
info: Caching catalog for lucid-64.
info: Applying configuration version '1352931741'
notice: /Stage[
notice: Finished catalog run in 0.03 seconds
# Correct content in file
root@lucid-64:~# cat /tmp/puppettest
Content from the fact
# Correct facter in lib puppet/ lib/ puppet/ lib/ puppet/ lib/facter puppet/ lib/facter/ test_fact. rb
root@lucid-64:~# find /var/lib/
/var/lib/
/var/lib/
/var/lib/