adrienthebo/r10k — pull request #73 by ssm (2013-10-18 23:10:59+00:00)
Title: Purge each basedir separately

This should close #64

Given a configuration like this:

cachedir: '/srv/puppet/cache'
sources:
one:
remote: '/srv/puppet/puppet.git/'
basedir: '/srv/puppet/env_test'
prefix: false
two:
remote: '/srv/puppet/puppet.git/'
basedir: '/srv/puppet/env_test'
three:
remote: '/srv/puppet/puppet.git/'
basedir: '/srv/puppet/env_test_more'

Output from "r10k deploy environment --verbose" is:

[R10K::Task::Deployment::DeployEnvironments - INFO] Loading environments from all sources
[R10K::Task::Environment::Deploy - NOTICE] Deploying environment three_testing
[R10K::Task::Environment::Deploy - NOTICE] Deploying environment three_production
[R10K::Task::Environment::Deploy - NOTICE] Deploying environment three_master
[R10K::Task::Environment::Deploy - NOTICE] Deploying environment two_testing
[R10K::Task::Environment::Deploy - NOTICE] Deploying environment two_production
[R10K::Task::Environment::Deploy - NOTICE] Deploying environment two_master
[R10K::Task::Environment::Deploy - NOTICE] Deploying environment testing
[R10K::Task::Environment::Deploy - NOTICE] Deploying environment production
[R10K::Task::Environment::Deploy - NOTICE] Deploying environment master
[R10K::Task::Deployment::PurgeEnvironments - INFO] Purging stale environments from /srv/puppet/env_test
[R10K::Task::Deployment::PurgeEnvironments - INFO] Purging stale environments from /srv/puppet/env_test_more

Result is:

# ls /srv/puppet/env_test*
/srv/puppet/env_test:
master	production testing two_master two_production two_testing

/srv/puppet/env_test_more:
three_master three_production	three_testing