I want to use puppet without a puppetmaster and apply manifests with a git push workflow. I'd like to avoid splitting up everything into modules, because the server config is not very complex. However, the template() function seems to have issues accessing templates that are not in modules.

If the manifest is located in <puppet-root>/manifests/site.pp how do I reference e.g. <puppet-root>/templates/sshd_config.erb?


having a templates dir in puppet root should work, try the following:

file { '/tmp/testfile':
    content => template('puppet:///templates/testfile.erb'),
  • Isn't puppet:/// only used in conjunction with a master? Also I have no client running. It's a simple puppet apply. No puppet server or client.
    – Era
    Feb 5 '13 at 21:28
  • This seems like it should work, but I'm trying it now and it doesn't. #weaksauce Feb 6 '14 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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