|
13 | 13 | # A load balancer address directing traffic to any of the "B" pool
|
14 | 14 | # compilers. This is used for DR configuration in large and extra large
|
15 | 15 | # architectures.
|
| 16 | +# @param ldap_config |
| 17 | +# This hash contains the options necessary for configuring the LDAP |
| 18 | +# connection on the main server. |
16 | 19 | #
|
17 | 20 | plan peadm::subplans::configure (
|
18 | 21 | # Standard
|
|
27 | 30 | Optional[Peadm::SingleTargetSpec] $replica_postgresql_host = undef,
|
28 | 31 |
|
29 | 32 | # Common Configuration
|
30 |
| - String $compiler_pool_address = $primary_host.peadm::certname(), |
31 |
| - Optional[String] $internal_compiler_a_pool_address = undef, |
32 |
| - Optional[String] $internal_compiler_b_pool_address = undef, |
33 |
| - Optional[String] $token_file = undef, |
34 |
| - Optional[String] $deploy_environment = undef, |
| 33 | + String $compiler_pool_address = $primary_host.peadm::certname(), |
| 34 | + Optional[String] $internal_compiler_a_pool_address = undef, |
| 35 | + Optional[String] $internal_compiler_b_pool_address = undef, |
| 36 | + Optional[String] $token_file = undef, |
| 37 | + Optional[String] $deploy_environment = undef, |
| 38 | + Optional[Peadm::Ldap_config] $ldap_config = undef, |
35 | 39 |
|
36 | 40 | # Other
|
37 | 41 | String $stagingdir = '/tmp',
|
|
105 | 109 | )
|
106 | 110 | }
|
107 | 111 |
|
| 112 | + if $ldap_config { |
| 113 | + # Run the task to configure ldap |
| 114 | + $ldap_result = run_task('peadm::pe_ldap_config', $primary_target, |
| 115 | + pe_main => $primary_target.peadm::certname(), |
| 116 | + ldap_config => $ldap_config, |
| 117 | + '_catch_errors' => true, |
| 118 | + ) |
| 119 | + |
| 120 | + # If there was an LDAP failure, note it and continue. |
| 121 | + if $ldap_result[0].error { |
| 122 | + out::message('There was a problem with the LDAP configuration, configuration must be completed manually.') |
| 123 | + out::message($ldap_result.to_data) |
| 124 | + } |
| 125 | + } |
| 126 | + |
108 | 127 | # Run Puppet everywhere to pick up last remaining config tweaks
|
109 | 128 | run_task('peadm::puppet_runonce', peadm::flatten_compact([
|
110 | 129 | $primary_target,
|
|
0 commit comments