aboutsummaryrefslogtreecommitdiff
path: root/manifests/confdir.pp
blob: 70be54c26d81d79d04851ea28325d9283ea81aef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# @summary Sets up configuration directory
#
# As noted elsewhere, concourse wants to be configured through environment variables.
# This creates a directory to store the environment variables in.
#
# @param conf_dir
#   Where additional environment files will be stored.
# @param purge_conf_dir
#   Should the directory mentioned in `conf_dir` be purged. If this
#   is true then decomissioning sub-configurations are done by simply
#   removing that resource.
# @api private
class concourse::confdir (
  Stdlib::Absolutepath $conf_dir                          = '/etc/conf.d/concourse.d',
  Boolean $purge_conf_dir                                 = true,
  Enum['absent', 'present'] $ensure            = 'present',
) {
  file { $conf_dir:
    ensure  => if $ensure == 'present' { 'directory' } else { 'absent' },
    purge   => $purge_conf_dir,
    recurse => true,
  }
}