Ask Your Question
0

module created using puppet module generate is not showing up in puppet module list command result

asked 2017-01-27 02:23:25 -0600

kopal gravatar image

updated 2017-01-27 07:07:56 -0600

DarylW gravatar image

Sorry if this is an obvious question, but I am fairly new to puppet

I have created a new module using the generate command as follows-------

puppet module generate --skip-interview root-linuxJmpServer

Notice: Generating module at /etc/puppetlabs/code/environments/production/modules/linuxJmpServer...
Notice: Populating templates...
Finished; module generated in linuxJmpServer.
linuxJmpServer/spec
linuxJmpServer/spec/spec_helper.rb
linuxJmpServer/spec/classes
linuxJmpServer/spec/classes/init_spec.rb
linuxJmpServer/README.md
linuxJmpServer/examples
linuxJmpServer/examples/init.pp
linuxJmpServer/Gemfile
linuxJmpServer/Rakefile
linuxJmpServer/manifests
linuxJmpServer/manifests/init.pp
linuxJmpServer/metadata.json
[root@ast4qshstpups02 modules]#

After creating the module I ran puppet module list , but this newly created module is not showing up in the output. Also, I was trying to add this module to the node group in the PE consiole but it is not showing up there. Am I doing something wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-01-27 07:07:08 -0600

DarylW gravatar image

The module needs to be in a folder that matches the classname, in your case in a folder named linuxJmpServer NOT root-linuxJmpServer, according to the Autoloader behavior - https://docs.puppet.com/puppet/latest...

I think the intent of the puppet module generate is to create the stand-alone repository that you send to git/forge and then you are using something like r10k or puppet-librarian with a Puppetfile to bring it all together into your environment, not directly create your module within your modulepath

edit flag offensive delete link more

Comments

Thanks for the answer, If I try to create the module manually, i.e. without `puppet module generate` , it still does not show up in the module list [root@ast4qshstpups02 modules]#mkdir -p linuxJmpServer/manifests ====contents of init.pp====== class linuxJmpServer{ } What am I doing wrong?

kopal gravatar imagekopal ( 2017-01-30 00:04:05 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-01-27 02:17:02 -0600

Seen: 64 times

Last updated: Jan 27