Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Say you had a file directive like so:

file: "/tmp/file_I_need":
    path => "/tmp/file_I_need",
    ensure => "present",

And then each file like so:


The question is this:

How do I tell which source file puppet is using? If I am running puppet on different hosts, I expect different files, I know it will use the file that matched first.

Short of modifying the file and seeing if the changes made it,is there a way to see exactly which of the 3 source files it chose?

This is puppet 2.6.2.(Server running on Debian)


I am seeking a different method than using a hash of the file. I also do not like the solution of putting the filename(or similar) somewhere in each file. I want to know how to get the path from puppet.

share|improve this question
The md5 sum of the file used is reported, it is a bit tedious, but you use that to determine which file was used. – Zoredache Dec 26 '12 at 19:19

put $hostname to file name or directory name:

source => ["puppet://${fileserver}/files/${name}/file_for_${hostname}.txt",
share|improve this answer
I am looking for a place where puppet would tell me, I(puppet) used this file : files/node1/file_I_need – Nick P. Dec 26 '12 at 19:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.