Cleaning up unmanaged files in boxen / puppet

Nginx and env files .. maybe others … get a mess after a while of trying different branch, since they are never auto-cleaned up. Already made this into a PR, but nobody seems to care … so fix it via overwrites.

Add an empty directory as modules/ours/files/emptydir + .gitkeep (pick whatever you want for ‘ours’).

  # remove any unmanaged configs
  # https://github.com/boxen/puppet-nginx/pull/34
  File <| title == $nginx::config::configdir |> {
    purge => true,
    force => true,
    source => "puppet:///modules/ours/emptydir",
    recurse => "true",
  }

  File <| title == $nginx::config::sitesdir |> {
    purge => true,
    force => true,
    source => "puppet:///modules/ours/emptydir",
    recurse => "true",
  }

  File <| title == $boxen::config::envdir |> {
    purge => true,
    force => true,
    source => "puppet:///modules/ours/emptydir",
    recurse => "true",
  }

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s