Skip to content

Instantly share code, notes, and snippets.

@xorpaul
Created August 16, 2019 15:48
Show Gist options
  • Save xorpaul/6031ae35ae69a5e6792c6485ef59966c to your computer and use it in GitHub Desktop.
Save xorpaul/6031ae35ae69a5e6792c6485ef59966c to your computer and use it in GitHub Desktop.
  • Added support for r10k-like purge behaviour of stale content

Starting with v.0.7.0 g10k supports the r10k-like purge behaviour of stale content with the different configuration settings purge_level and purge_whitelist as documented here for purge_levels and here for purge_whiltelist

Please check if you need to whitelist files/folders inside your Puppet environments!

As an additional setting, you can also whitelist Puppet environments with deployment_purge_whitelist, that would've been purged by the deployment purge_level. This can be helpful if you have a similar source name or prefix set. E.g. having a source called foobar and another one foobar_hiera would have purged all foobar_hiera_* branches if there are not branches called hiera_master or similar in the foobar source.

Example:

---
deploy:
  purge_levels: ['deployment', 'puppetfile', 'environment']
  purge_whitelist: [ '.latest_revision', '.resource_types' ]

sources:
  example:
    remote: 'https://github.com/xorpaul/g10k-environment.git'
    basedir: '/tmp/out/'
    prefix: true
  full:
    remote: 'https://github.com/xorpaul/g10k-fullworking-env.git'
    basedir: '/tmp/out/'
    prefix: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment