Adapt base classes for the mail edge gateway (#555)
ci/woodpecker/pr/ruby-validate Pipeline was successful
ci/woodpecker/pr/erb-validate Pipeline was successful
ci/woodpecker/pr/puppet-lint Pipeline was successful
ci/woodpecker/pr/bolt-validate Pipeline was successful
ci/woodpecker/pr/yamllint Pipeline was successful
ci/woodpecker/pr/epp-validate Pipeline was successful
ci/woodpecker/pr/ruby-check Pipeline was successful
ci/woodpecker/pr/puppet-validate Pipeline was successful

The edge gateways sit in BinaryLane VPCs with no consul datacentre and a public interface, so the consul agent cannot join and sshd must not serve the internet.

- add an enable toggle to profiles::consul::client, off for the gateway role
- disable node_exporter on the gateway role, as it registers via consul
- restrict sshd AllowUsers to the edge VPCs (198.18.30.0/24, 198.18.31.0/24) and the lab (198.18.0.0/16, 10.10.12.200/32)

Stacked on #554.

Reviewed-on: #555
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
This commit was merged in pull request #555.
This commit is contained in:
2026-10-13 21:48:03 +11:00
committed by BenVincent
parent 01f242657c
commit 343d645d24
2 changed files with 13 additions and 0 deletions
+8
View File
@@ -2,6 +2,14 @@
hiera_include:
- redis
# no consul datacentre at the edge, so nothing to register or scrape via consul
profiles::consul::client::enable: false
exporters::node_exporter::enable: false
# ssh only from the edge vpcs (syd, mel) and the lab over the vpn route
ssh::server::options:
AllowUsers: '*@198.18.30.0/24 *@198.18.31.0/24 *@198.18.0.0/16 *@10.10.12.200/32'
# local caching resolver for postfix and rspamd, forwarding to the lab resolver over the vpn route
dnsmasq::no_resolv: true
dnsmasq::cache_size: 10000
+5
View File
@@ -12,8 +12,13 @@ class profiles::consul::client (
Array[Hash] $node_rules = [],
Hash $ports = {},
Stdlib::IP::Address $host_addr = $facts['networking']['ip'],
Boolean $enable = true,
) {
unless $enable {
return()
}
if $facts['enc_role'] != $members_role {
# set a datacentre/cluster name