diff options
Diffstat (limited to 'manifests/web.pp')
-rw-r--r-- | manifests/web.pp | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/manifests/web.pp b/manifests/web.pp index fd87a67..e3620f7 100644 --- a/manifests/web.pp +++ b/manifests/web.pp @@ -5,16 +5,8 @@ # This service WILL be managed by us. # @param service_unit # Exact unit name (in terms of systemd) of the service. -# @param conf_file -# Where configuration environment variables will be stored. -# Currently hard-coded in the service file. -# @param conf_dir -# Where additional environment files will be stored. Used (at -# least) by each auth resource. -# @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. +# @param conf_name +# Local name of the main configuration file. # @param ensure # @param cluster # Which concourse this web node is part of. An @@ -83,7 +75,7 @@ class concourse::web ( String $tsa_host_key_file = "${key_dir}/tsa_host_key", String $tsa_authorized_keys_file = "${key_dir}/authorized_worker_keys", - String $peer_address = $facts['ipaddress'], + String $peer_address = $facts['networking']['ip'], Optional[String] $postgres_host = undef, Optional[String] $postgres_port = undef, @@ -98,9 +90,7 @@ class concourse::web ( String $service = 'concourse', String $service_unit = "${service}.service", - Stdlib::Absolutepath $conf_file = '/etc/conf.d/concourse', - Stdlib::Absolutepath $conf_dir = '/etc/conf.d/concourse.d', - Boolean $purge_conf_dir = true, + String $conf_name = 'web-base', Enum['absent', 'present'] $ensure = 'present', Array[String] $packages = [ @@ -136,18 +126,9 @@ class concourse::web ( 'CONCOURSE_BACKEND_MAX_CONNS' => $backend_max_conns, } + $extra_env - file { $conf_file: - ensure => $ensure, - mode => '0600', - show_diff => false, - content => epp("${module_name}/env.epp", { 'entries' => $env }), - } - - file { $conf_dir: - ensure => if $ensure == 'present' { 'directory' } else { 'absent' }, - purge => $purge_conf_dir, - recurse => true, - notify => Service[$service], + concourse::conf::web { $conf_name: + ensure => $ensure, + env => $env, } file { $key_dir: |