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, 2019 in Puppet by Karan
• 8,200 points
57 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, 2019 by Sirajul
• 45,950 points

Related Questions In Puppet

0 votes
1 answer

Would i be able to utilize same module that i have in puppet master in my puppet agent?

Yes, you can do this. The issue that ...READ MORE

answered Aug 7, 2019 in Puppet by Sirajul
• 45,950 points
23 views
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, 2019 in Puppet by Sirajul
• 45,950 points
28 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,400 points
303 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, 2019 in Puppet by Sirajul
• 45,950 points
34 views