From 5b100712c03c9233ec89d6a30d568d3d296eab1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 20 Jun 2023 22:32:35 +0200 Subject: fixes --- manifests/confdir.pp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 manifests/confdir.pp (limited to 'manifests/confdir.pp') diff --git a/manifests/confdir.pp b/manifests/confdir.pp new file mode 100644 index 0000000..70be54c --- /dev/null +++ b/manifests/confdir.pp @@ -0,0 +1,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, + } +} -- cgit v1.2.3