Ask Your Question
0

Code manager setup - pulling strange modules directory

asked 2016-07-12 15:17:18 -0500

jcreek gravatar image

I have setup PE 2016.1.2.0 with code manager. I followed the online documentation https://docs.puppet.com/pe/2016.2/cod...

Everything seems to work fine except:

In each of my environments under /etc/puppetlabs/code/environments (e.g. ..../dev, .../production, etc.) there is a modules directory with several modules like concat, firewall, mysql, etc. Those modules are not in my control repo. When I create a new file (or directory other than modules) in my environments/environmentname (e.g. .../environments/dev) directory in my git repo then do a puppet-code deploy dev -w, it pulls those files and directories down fine. But if I put something in the modules directory in my git repo, then do a puppet-code deploy dev -w, it ignores what is in the git repo in the modules directory.

Where did this modules directory come from and how do I get rid of/alter it with puppe-code?

Thanks,

Jeff

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-07-12 16:08:07 -0500

lupin gravatar image

Do you have Puppetfile in your control repo? Must have been define in there.

edit flag offensive delete link more

Comments

Arrg! Forgot about the Puppetfile. Thanks!

jcreek gravatar imagejcreek ( 2016-07-18 08:30:55 -0500 )edit
1

answered 2016-07-13 04:57:28 -0500

smbambling gravatar image

If you do have a Puppetfile with the needed modules listed I believe the behavior is to only create a modules directory with the specified modules in the Puppetfile checked out.

If you want to have 'static' modules that are included inside your control repo ( we imbed both the roles and profiles modules inside the control repo) you can update the environment.conf to include another module path in addition to the modules folder in the /etc/puppetlabs/code/environments/$environment path

Here we have out role and profile modules under the site directory structure ```

List of directories Puppet will read modules from

modulepath = ./site:./modules:$basemodulepath ```

edit flag offensive delete link more

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: 2016-07-12 15:17:18 -0500

Seen: 29 times

Last updated: Jul 13 '16