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,780 points
23 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
• 25,220 points

Related Questions In Puppet

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

Puppet: Can I publish my custom module on the forge repository?

To share your module with other Puppet users, get ...READ MORE

answered Aug 26 in Puppet by Sirajul
• 25,220 points
12 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
147 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
• 25,220 points
13 views