Friday, November 11, 2011

Could not evaluate: Could not retrieve information from source(s)

Oops! I was evaluating a template, NOT a file.

file {
    "/destination/file/path":
          source => template("path/to/template");
}

The key is that "source" should be "content"!


file {
    "/destination/file/path":
          content => template("path/to/template");
}

So, what was happening behind the scenes is that puppet was trying to source the literal value of the evaluated template file. Could be useful?

2 comments:

  1. Quite useful. Not sure how I bungled this (though I'm trying to move to a module-centric management style for puppet, so it's a likely cause), but yes, "source" should be "content", and now puppetd can find my files. Thanks!

    ReplyDelete
  2. Thanx ! I did not understand the error message...

    ReplyDelete