Skip to content

Commit ff38069

Browse files
committed
feat(plans): add peadm::add_compiler plan
- Introduced a new plan `peadm::add_compiler` as a proxy for `peadm::add_compilers`. - Added documentation for the new plan in REFERENCE.md. - Parameters include `avail_group_letter`, `compiler_host`, `dns_alt_names`, `primary_host`, and `primary_postgresql_host`. - The plan outputs a deprecation message and calls `peadm::add_compilers` with the provided parameters.
1 parent b9bfc20 commit ff38069

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

REFERENCE.md

+51
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292

9393
#### Public Plans
9494

95+
* [`peadm::add_compiler`](#peadm--add_compiler): Proxy plan for peadm::add_compilers.
9596
* [`peadm::add_compilers`](#peadm--add_compilers): Add new compilers to a PE architecture or replace an existing with new configuration.
9697
* [`peadm::add_database`](#peadm--add_database)
9798
* [`peadm::add_replica`](#peadm--add_replica): Add or replace a replica host.
@@ -1594,6 +1595,56 @@ Which port to query the status API on
15941595

15951596
## Plans
15961597

1598+
### <a name="peadm--add_compiler"></a>`peadm::add_compiler`
1599+
1600+
Proxy plan for peadm::add_compilers.
1601+
1602+
#### Parameters
1603+
1604+
The following parameters are available in the `peadm::add_compiler` plan:
1605+
1606+
* [`avail_group_letter`](#-peadm--add_compiler--avail_group_letter)
1607+
* [`compiler_host`](#-peadm--add_compiler--compiler_host)
1608+
* [`dns_alt_names`](#-peadm--add_compiler--dns_alt_names)
1609+
* [`primary_host`](#-peadm--add_compiler--primary_host)
1610+
* [`primary_postgresql_host`](#-peadm--add_compiler--primary_postgresql_host)
1611+
1612+
##### <a name="-peadm--add_compiler--avail_group_letter"></a>`avail_group_letter`
1613+
1614+
Data type: `Enum['A', 'B']`
1615+
1616+
_ Either A or B; whichever of the two letter designations the compiler are being assigned to
1617+
1618+
Default value: `'A'`
1619+
1620+
##### <a name="-peadm--add_compiler--compiler_host"></a>`compiler_host`
1621+
1622+
Data type: `Peadm::SingleTargetSpec`
1623+
1624+
_ The hostname and certname of the new compiler
1625+
1626+
##### <a name="-peadm--add_compiler--dns_alt_names"></a>`dns_alt_names`
1627+
1628+
Data type: `Optional[String[1]]`
1629+
1630+
_ A comma-separated list of DNS alt names for the compiler.
1631+
1632+
Default value: `undef`
1633+
1634+
##### <a name="-peadm--add_compiler--primary_host"></a>`primary_host`
1635+
1636+
Data type: `Peadm::SingleTargetSpec`
1637+
1638+
_ The hostname and certname of the primary Puppet server
1639+
1640+
##### <a name="-peadm--add_compiler--primary_postgresql_host"></a>`primary_postgresql_host`
1641+
1642+
Data type: `Optional[Peadm::SingleTargetSpec]`
1643+
1644+
_ The hostname and certname of the PE-PostgreSQL server with availability group $avail_group_letter
1645+
1646+
Default value: `undef`
1647+
15971648
### <a name="peadm--add_compilers"></a>`peadm::add_compilers`
15981649

15991650
Add new compilers to a PE architecture or replace an existing with new configuration.

plans/add_compiler.pp

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# @api public
2+
#
3+
# @summary Proxy plan for peadm::add_compilers.
4+
# @param avail_group_letter _ Either A or B; whichever of the two letter designations the compiler are being assigned to
5+
# @param compiler_host _ The hostname and certname of the new compiler
6+
# @param dns_alt_names _ A comma-separated list of DNS alt names for the compiler.
7+
# @param primary_host _ The hostname and certname of the primary Puppet server
8+
# @param primary_postgresql_host _ The hostname and certname of the PE-PostgreSQL server with availability group $avail_group_letter
9+
plan peadm::add_compiler(
10+
Enum['A', 'B'] $avail_group_letter = 'A' ,
11+
Optional[String[1]] $dns_alt_names = undef,
12+
Peadm::SingleTargetSpec $compiler_host,
13+
Peadm::SingleTargetSpec $primary_host,
14+
Optional[Peadm::SingleTargetSpec] $primary_postgresql_host = undef,
15+
) {
16+
out::message('Warning: The add_compiler plan is deprecated and will be removed in a future release. Please use the add_compilers plan instead. ')
17+
run_plan('peadm::add_compilers',
18+
avail_group_letter => $avail_group_letter,
19+
dns_alt_names => $dns_alt_names ? { undef => undef, default => Array($dns_alt_names) },
20+
compiler_hosts => $compiler_host,
21+
primary_host => $primary_host,
22+
primary_postgresql_host => $primary_postgresql_host,
23+
)
24+
}

0 commit comments

Comments
 (0)