Casey Deccio
2008-Dec-09 18:05 UTC
[Puppet Users] Accessing a file source from a custom function
I''d like to be able to generate the contents of a file resource based on the contents of another file resources. For example: File { "/tmp/myfile": source => "puppet:///mymodule/myfile", } File { "/tmp/otherfile": content =>generate_otherfile(File["/tmp/myfile"])), } in this case the generate_otherfile() function will use the resource reference passed to manipulate the contents of myfile to generate otherfile. My question are 1) whether or not it is possible to access the contents of myfile (i.e., by finding the appropriate source, etc.), and 2) how would it be done. Thanks, Casey --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---