Skip to content

Instantly share code, notes, and snippets.

@jbartko
Created June 2, 2013 20:48
Show Gist options
  • Save jbartko/5694921 to your computer and use it in GitHub Desktop.
Save jbartko/5694921 to your computer and use it in GitHub Desktop.
Example of r10k purging its basedir even though the purgedirs directive is commented out.
$ cat /etc/r10k.yaml
# The location to use for storing cached Git repos
:cachedir: '/var/cache/r10k'

# A list of git repositories to create
:sources:
  # This will clone the git repository and instantiate an environment per
  # branch in /etc/puppet/environments
  :plops:
    remote: 'git@git.$job.$tld:$user/puppet-environments-r10k.git'
    basedir: '/etc/puppet/environments'

# This directory will be purged of any directory that doesn't map to a
# git branch
#:purgedirs:
#  - '/etc/puppet/environments'
$ pwd
/etc/puppet/environments
$ ln -s ../../../etc/puppet/environments/master/ production
$ ll
total 8
drwxr-sr-x 5 root puppetadmin 4096 Jun  2 14:42 develop
drwxr-sr-x 5 root puppetadmin 4096 Jun  2 14:43 master
lrwxrwxrwx 1 root puppetadmin   40 Jun  2 15:10 production -> ../../../etc/puppet/environments/master/
$ r10k deploy environment
$ ll
total 8
drwxr-sr-x 5 root puppetadmin 4096 Jun  2 14:42 develop
drwxr-sr-x 5 root puppetadmin 4096 Jun  2 14:43 master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment