Puppet: Invalid module name; module names must be alphanumeric (plus '-'), not 'puppet:' at /my/path/init.pp:4 on node pcb.unixdaemon.private

0 votes

I'm using a puppet template to manage a config file. I have a ubuntu puppet server and a Linux agent.

file { '/tmp/filesources':
  content => template('puppet:///modules/mymodule/mymodule.conf.erb'),
}

It displays "module names must be alphanumeric (plus '-'), not 'puppet:" . I am trying hard to figure out this. what's wrong?

Aug 9 in Puppet by Karan
• 1,450 points
15 views

1 answer to this question.

0 votes

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. 

Try this:

file { '/tmp/filesources': 
content => template('mymodule/mymodule.conf.erb'), }

This should do!

answered Aug 9 by Sirajul
• 19,070 points

Related Questions In Puppet

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Error: Could not find init script for 'puppet' - Puppet error

You need to be running your processes ...READ MORE

answered Mar 12 in Puppet by Haider
101 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
122 views
0 votes
1 answer
0 votes
1 answer

Puppet module path is not updating.

The puppet confdir depends on user that executes puppet ...READ MORE

answered Aug 5 in Puppet by Sirajul
• 19,070 points
10 views