|
1 | 1 | # @summary Configure first-time classification and HA setup
|
2 | 2 | #
|
3 | 3 | plan peadm::action::configure (
|
4 |
| - # Large |
| 4 | + # Standard |
5 | 5 | Peadm::SingleTargetSpec $master_host,
|
6 |
| - Optional[TargetSpec] $compiler_hosts = undef, |
7 | 6 | Optional[Peadm::SingleTargetSpec] $master_replica_host = undef,
|
8 | 7 |
|
| 8 | + # Large |
| 9 | + Optional[TargetSpec] $compiler_hosts = undef, |
| 10 | + |
9 | 11 | # Extra Large
|
10 | 12 | Optional[Peadm::SingleTargetSpec] $puppetdb_database_host = undef,
|
11 | 13 | Optional[Peadm::SingleTargetSpec] $puppetdb_database_replica_host = undef,
|
|
37 | 39 | $compiler_hosts,
|
38 | 40 | )
|
39 | 41 |
|
40 |
| - # Set up the console node groups to configure the various hosts in their |
41 |
| - # roles |
| 42 | + # Define the global hiera.yaml file on the Master; and syncronize to any Replica and Compilers. |
| 43 | + # This enables Data in the Classifier/Console, which is used/required by this architecture. |
| 44 | + # Necessary, for example, when promoting the Replica due to PE-18400 (and others). |
| 45 | + $global_hiera_yaml = run_task('peadm::read_file', $master_target, |
| 46 | + path => '/etc/puppetlabs/puppet/hiera.yaml', |
| 47 | + ).first['content'] |
| 48 | + |
| 49 | + run_task('peadm::mkdir_p_file', peadm::flatten_compact([ |
| 50 | + $master_replica_target, |
| 51 | + $compiler_targets, |
| 52 | + )], |
| 53 | + path => '/etc/puppetlabs/puppet/hiera.yaml', |
| 54 | + owner => 'root', |
| 55 | + group => 'root', |
| 56 | + mode => '0644', |
| 57 | + content => $global_hiera_yaml, |
| 58 | + ) |
| 59 | + |
| 60 | + # Set up the console node groups to configure the various hosts in their roles |
42 | 61 |
|
43 | 62 | # Pending resolution of Bolt GH-1244, Target objects and their methods are
|
44 | 63 | # not accessible inside apply() blocks. Work around the limitation for now
|
|
0 commit comments