adrienthebo/r10k — pull request #132 by naevtamarkus (2014-05-14 09:08:31+00:00)
Title: Feature/extra parameters

Hi,

This adds two optional parameters (puppetfile and subdir) to each source inside /etc/r10k.yaml, that used to be pre-defined constants (Puppetfile and modules, respectively). This adds a lot of flexibility by allowing other non-modules repositories to be deployed with r10k as well (like hieradata, roles, etc)

For example:

:sources:
# This will clone the git repository and instantiate an environment per
# branch in /etc/puppet/environments
:moria_modules:
remote: 'xxx.xx:/git/puppet/config/moria-site.git'
basedir: '/root/environments'
puppetfile: 'Puppetfile.modules'
subdir: 'modules'

:moria_roles:
remote: 'xxx.xx:/git/puppet/config/moria-site.git'
basedir: '/root/environments'
puppetfile: 'Puppetfile.roles'
subdir: 'roles'

:moria_hieradata:
remote: 'xxx.xx:/git/puppet/config/moria-site.git'
basedir: '/root/environments'
puppetfile: 'Puppetfile.hieradata'
subdir: 'hieradata'

This would take each source and deploy, based on different Puppetfiles (even in the same repo), in a separate subdirectory (whose parent is $basedir/$env).

This feature has the potential to allow other non-puppet uses for r10k, like software deployment.

This is also backwards compatible.

I am sorry, but I am not familiar with the rspec test ruby development... so I could not contribute to that part.

Hope you like it!