Removing unmanaged path /etc/puppetlabs/code/environments/ - r10k

896 views
Skip to first unread message

Ali

unread,
Jun 17, 2016, 4:56:56 PM6/17/16
to Puppet Users

r10k deployment is failing, if  my repo paths has  "modules"  in it .   if I change modules to any other word or even module it works fine .  In order to correctly map environment on my puppet master I need r10k to map repo as /etc/puppetlabs/code/environments/production [branch name ] / modules/ modulename .  Trying to figure out where is conflict any help will be appreciated . 

repo server :

[gitcodereposerver coderepo]# ls -la
total
16
drwxr
-x--- 4 root root 4096 Jun 17 16:35 .
drwxr
-x--- 7 root root 4096 Jun 15 15:43 ..
drwxr
-x--- 8 root root 4096 Jun 17 16:35 .git
drwxr
-x--- 3 root root 4096 Jun 17 16:35 modules


gitcodereposerver coderepo]# git branch -v
  development ad420ad test
* production  ad420ad test



puppet master:



puppetmaster r10k]# cat r10k.yaml
---
sources
:
  main
:
    remote
: 'root@gitcodereposerver:/home/pupp/coderepo'
    basedir
: '/etc/puppetlabs/code/environments'


 puppetmaster]#r10k deploy environment -pv
INFO    
-> Deploying environment /etc/puppetlabs/code/environments/development
INFO    
-> Environment development is now at a20646d68ed3259e3ae6eeda6c31dfca9f9ab9f0
INFO    
-> Deploying environment /etc/puppetlabs/code/environments/production
INFO    
-> Environment production is now at c73bcc40b41373d87908093035be58e60fc2ea29
INFO    
-> Removing unmanaged path /etc/puppetlabs/code/environments/production/modules/compliance


no compliance folder under modules  as shown below .

puppetmaster environments]# ls
development  production
[ environments]# cd production/
[ production]# ls
modules
[ production]# cd modules/
[modules]# ls



Thanks,


Rob Nelson

unread,
Jun 17, 2016, 5:28:42 PM6/17/16
to puppet...@googlegroups.com
r10k will deploy the modules listed in the Puppetfile into the modules directory. If you need some local (to the controlrepo) modules that are not deployed from the Puppetfile, the recommendation is to add them to a directory called site, dist, or similar, and create a file called environment.conf that says:

    modulepath = site:modules:$basemodulepath

This allows the contents of the site directory (within the repo), modules (populated by r10k) and the $basemodulepath (set via puppet.conf or defaults, oftentimes unused) to all be valid module locations without r10k or other automation stepping all over it.

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f0b9c4e2-a90a-4b3e-ab75-094592e457d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Watters

unread,
Jun 17, 2016, 6:15:28 PM6/17/16
to Puppet Users
I actually take the opposite approach.  Modules from the forge go in a 
directory named "forge_modules" and r10k will leave anything located in 
modules alone.

 From r10k.yaml:

forge 'http://forge.puppetlabs.com'
moduledir 'forge_modules'

Anderson Mills

unread,
Jun 20, 2016, 1:36:23 PM6/20/16
to Puppet Users
I believe moduledir should be set in the Puppetfile, not in r10k.yaml. (Or was that a mistype?)

https://github.com/puppetlabs/r10k/blob/master/doc/puppetfile.mkd#moduledir
Reply all
Reply to author
Forward
0 new messages