On Sunday, October 13, 2013 4:53:10 PM UTC-5, Sans wrote:
>
> Hi Cristian,
>
> That sounds a workable solution.
>


Unlikely.  Custom functions run on the master during catalog compilation.  
If you need data from a local file on the node to compute the correct value 
for your erstwhile $::am_running_oss fact then changing the fact to a 
function will not improve that data's availablility.

On the other hand, if the idea is that the content of /home/admin/OSs.txt 
is managed exclusively by Puppet in the first place, then what's the 
point?  The master must already have enough information to determine what 
that file is supposed to contain, and thus what the fact value is supposed 
to be.  Just set a variable in an appropriate class with the appropriate 
computed value, and skip the fact altogether.  If you only needed the file 
to support the fact, then dump the file, too.


John

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to