Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 257

Set File content via Hiera

$
0
0
Hi, I am looking for the syntax to set the content for a File resource from hiera. Specifically I want to set the template being used: # Puppet class test ( $file_content = undef, ){ file{'/tmp/testfile': ensure => file, content => $file_content, } } # Hiera --- test::file_content: template('modules/test/test.erb') Since Hiera is returning a string, the template function is not being evaluated. I am pretty sure I saw this being done somewhere, but I cannot figure out the correct syntax anymore.

Viewing all articles
Browse latest Browse all 257

Trending Articles