Book Image

LEARNING PUPPET

Book Image

LEARNING PUPPET

Overview of this book

Table of Contents (17 chapters)
Learning Puppet
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Troubleshooting missing resources


When dealing with files and templates in Puppet modules, it sometimes happens that the reference to a file or a template in the manifest is not correct. Despite many years of puppeteering, I am still struggling to remember whether to use the content or source attribute. If I have to use the source attribute, what is the format of the URL that I must use when pointing to the file in a module? Did it have two or three forward slashes? I give up and use copy and paste instead!

Diagnosing template errors

The problem with copy and paste is that it often contains references to different Puppet modules. This results in Puppet reporting errors saying that Puppet cannot find a particular resource. Here is an example of the error when Puppet fails to find a template that is referenced in the flib/manifests/site.pp file:

The message Error 400 on SERVER: Could not find template 'webapp/timestamp.erb' at /etc/puppetlabs/puppet/environments/development/modules/flib/manifests...