Puppet reports "module names must be alphanumeric (plus '-'), not 'puppet:"
# this is invalid
file { '/tmp/filesources':
content => template('puppet:///modules/mymodule/mymodule.conf.erb'),
}
# and will cause an error like this to appear
# Invalid module name; module names must be alphanumeric
# (plus '-'), not 'puppet:'
# at /my/path/init.pp:4 on node pcb.unixdaemon.private
# instead it should look like this
file { '/tmp/filesources':
content => template('mymodule/mymodule.conf.erb'),
}
When running puppet you see lines that look like this on your screen or in the logs:
Invalid module name; module names must be alphanumeric (plus '-'), not 'puppet:'
at /my/path/init.pp:4 on node pcb.unixdaemon.private
This is often caused when you confuse the content
and source
attributes and mostly when you are refactoring a resource from a static
file to one that uses a template for dynamic content. This is an
annoying mistake as you can easily miss it due to the syntax being
correct - just not in this context.