[PUP-3124] tool should generate code using the actual module name as the directory instead of username-modulename Created: 2013/12/16  Updated: 2015/04/09  Resolved: 2014/10/13

Status: Closed
Project: Puppet
Component/s: PMT
Affects Version/s: PUP 3.7.1
Fix Version/s: PUP 4.0.0

Type: Improvement Priority: Normal
Reporter: garrett honeycutt Assignee: Unassigned
Resolution: Fixed Votes: 3
Labels: redmine
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by MODULES-1283 PMT should create the new module with... Closed
is duplicated by PUP-3354 Puppet Module Generate creates non li... Closed
Template:
QA Contact: Eric Thompson

 Description   

This is what currently happens

<pre>
[root@puppet modules]# puppet-module generate ghoneycutt-apache
=====================================================================
Generating module at /etc/puppetlabs/puppet/modules/ghoneycutt-apache
---------------------------------------------------------------------
ghoneycutt-apache
ghoneycutt-apache/Modulefile
ghoneycutt-apache/tests
ghoneycutt-apache/tests/init.pp
ghoneycutt-apache/README
ghoneycutt-apache/manifests
ghoneycutt-apache/manifests/init.pp
ghoneycutt-apache/metadata.json
ghoneycutt-apache/spec
ghoneycutt-apache/spec/spec.opts
ghoneycutt-apache/spec/spec_helper.rb
</pre>

This is what should happen.

<pre>
[root@puppet modules]# puppet-module generate ghoneycutt-apache
=====================================================================
Generating module at /etc/puppetlabs/puppet/modules/apache
---------------------------------------------------------------------
apache
apache/Modulefile
apache/tests
apache/tests/init.pp
apache/README
apache/manifests
apache/manifests/init.pp
apache/metadata.json
apache/spec
apache/spec/spec.opts
apache/spec/spec_helper.rb
</pre>

People actually use the tool by doing the following, which one should not have to do.

<pre># puppet-module generate ghoneycutt-apache && mv ghoneycutt-apache apache</pre>

==



 Comments   
Comment by Spencer Krum [ 2014/05/26 ]

I would like to see this fixed as well. Bump!

Comment by Hunter (Hunner) Haugen [ 2014/08/21 ]

For reference, the work was accepted as part of https://github.com/puppetlabs/puppet/pull/1711 but had to be reverted due to testing issues. If anyone wants to follow up on this work they are welcome to.

Comment by garrett honeycutt [ 2014/08/21 ]

The Jenkins errors referenced in the PR are all 404's, so it is not apparent what is wrong with the code.

Comment by Hunter (Hunner) Haugen [ 2014/08/21 ]

From #puppet-dev:

14:06         +finch | electrical: I believe the failure occurred because acceptance tests were assuming that `puppet module generate` was outputting username-modulename genned modules
...
14:08     electrical | ahh okay :-) thanks. i'll make some time tomorrow and send a new PR.

Comment by Adrien Thebo [ 2014/10/13 ]

Merged into master in 953449b4; this should be released in Puppet 4.0.

Comment by garrett honeycutt [ 2014/10/13 ]

Thank you!

Generated at Thu Nov 21 02:46:24 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.