[colug-432] Puppet and templates

Mike Plemmons mikeplemmons at gmail.com
Wed Dec 17 22:30:01 EST 2014


I am trying to understand the use of templates but it appears I have come
across an error that has me stumped.

[root at puppet ~]# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not find template 'issue/issue.erb' at
/etc/puppetlabs/puppet/modules/issue/manifests/init.pp:15 on node
puppet.n1mtp.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run


All the documentation I see states that I am using the correct directory
structure for the templates and that my use of the template in init.pp is
correct.  What am I missing?

I am using Puppet Enterprise 3.7 and performing the test on the Puppet
server itself.

[root at puppet ~]# cd /etc/puppetlabs/puppet/modules
[root at puppet modules]# tree
.
└── issue
    └── manifests
        ├── init.pp
        └── templates
            └── issue.erb

[root at puppet manifests]# cat init.pp
class issue {
    notify { 'Setting up /etc/issue': }

    package { 'issue':
        ensure => installed,
    }

    file { '/etc/issue':
        path    => '/etc/issue',
        ensure  => file,
        owner   => 'root',
        group   => 'root',
        mode    => '0644',
        require => Package['issue'],
        content => template('issue/issue.erb'),
    }

}

[root at puppet manifests]# cd templates/
[root at puppet templates]# cat issue.erb
Puppet Test Environment
\S
Kernel \r on an \m
HN: <% @hostname %>
IP: <% @ipaddress %>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20141217/9eb1f44c/attachment.html 


More information about the colug-432 mailing list