diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-06-20 22:32:35 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-06-20 22:32:35 +0200 |
commit | 5b100712c03c9233ec89d6a30d568d3d296eab1a (patch) | |
tree | 9d6e7e92728e1370cade5bc5bbf97896d4e5ba58 /manifests/auth | |
parent | fixes (diff) | |
download | concourse-5b100712c03c9233ec89d6a30d568d3d296eab1a.tar.gz concourse-5b100712c03c9233ec89d6a30d568d3d296eab1a.tar.xz |
fixes
Diffstat (limited to '')
-rw-r--r-- | manifests/auth/ldap.pp | 24 | ||||
-rw-r--r-- | manifests/auth/local.pp | 22 |
2 files changed, 7 insertions, 39 deletions
diff --git a/manifests/auth/ldap.pp b/manifests/auth/ldap.pp index 028e898..9d10ceb 100644 --- a/manifests/auth/ldap.pp +++ b/manifests/auth/ldap.pp @@ -62,7 +62,7 @@ class concourse::auth::ldap ( String $user_search_username = 'uid', Optional[String] $display_name = undef, Optional[String] $user_search_filter = undef, - Optional[String] $user_search_id_attr = undef, + Optional[String] $user_search_id_attr = undef, Optional[String] $user_search_email_attr = undef, Optional[String] $user_search_name_attr = undef, Optional[Stdlib::Absolutepath] $ca_cert = undef, @@ -76,8 +76,6 @@ class concourse::auth::ldap ( Optional[Array[String]] $main_team_group = undef, Enum['absent', 'present'] $ensure = 'present', ) { - $env_file = "${concourse::web::conf_dir}/auth-ldap" - $environment = { 'CONCOURSE_LDAP_HOST' => $host, 'CONCOURSE_LDAP_BIND_DN' => $bind_dn, @@ -106,22 +104,8 @@ class concourse::auth::ldap ( }, } - file { $env_file: - ensure => $ensure, - content => epp("${module_name}/env.epp", { 'entries' => $environment }), - # To not show new password - show_diff => false, - mode => '0600', - } - - $dropin_content = @("EOF") - [Service] - EnvironmentFile=${env_file} - | EOF - - systemd::dropin_file { 'concourse-ldap-auth.conf': - ensure => $ensure, - unit => $concourse::web::service_unit, - content => $dropin_content, + concourse::conf::web { 'auth-ldap': + ensure => $ensure, + env => $environment, } } diff --git a/manifests/auth/local.pp b/manifests/auth/local.pp index 9329e30..a66fba5 100644 --- a/manifests/auth/local.pp +++ b/manifests/auth/local.pp @@ -15,8 +15,6 @@ class concourse::auth::local ( Optional[Array[String]] $main_team_group = undef, # ignored Enum['absent', 'present'] $ensure = 'present', ) { - $env_file = "${concourse::web::conf_dir}/auth-local" - $environment = { 'CONCOURSE_ADD_LOCAL_USER' => $users.map |$user| { $name = $user['name'] @@ -32,22 +30,8 @@ class concourse::auth::local ( }, } - file { $env_file: - ensure => $ensure, - content => epp("${module_name}/env.epp", { 'entries' => $environment }), - # To not show new password - show_diff => false, - mode => '0600', - } - - $dropin_content = @("EOF") - [Service] - EnvironmentFile=${env_file} - | EOF - - systemd::dropin_file { 'concourse-local-auth.conf': - ensure => $ensure, - unit => $concourse::web::service_unit, - content => $dropin_content, + concourse::conf::web { 'auth-local': + ensure => $ensure, + env => $environment, } } |