From 410a1f13d0cfc9cb198c7c71967c1106f54a4b40 Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Sat, 3 Oct 2026 20:46:44 +1000 Subject: [PATCH] Add 198.18.2.0/24 router loopback subnet (#535) Router loopbacks in 198.18.2.0/24 (e.g. prodnxsr0020, 198.18.2.160) match no subnet entry, so they get unknown environment/region/country facts and are not autosigned. - add 198.18.2.0/24 to subnet_facts as prod/syd1/au/common - add 198.18.2.0/24 to puppet master autosign subnet_ranges Reviewed-on: https://git.unkin.net/unkin/puppet-prod/pulls/535 Co-authored-by: unkin-agent Co-committed-by: unkin-agent --- hieradata/roles/infra/puppet/master.yaml | 1 + modules/libs/lib/facter/subnet_facts.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/hieradata/roles/infra/puppet/master.yaml b/hieradata/roles/infra/puppet/master.yaml index a856556..f3182c1 100644 --- a/hieradata/roles/infra/puppet/master.yaml +++ b/hieradata/roles/infra/puppet/master.yaml @@ -1,5 +1,6 @@ --- profiles::puppet::autosign::subnet_ranges: + - '198.18.2.0/24' - '198.18.13.0/24' - '198.18.14.0/24' - '198.18.15.0/24' diff --git a/modules/libs/lib/facter/subnet_facts.rb b/modules/libs/lib/facter/subnet_facts.rb index a0ed78a..0accee1 100644 --- a/modules/libs/lib/facter/subnet_facts.rb +++ b/modules/libs/lib/facter/subnet_facts.rb @@ -5,6 +5,7 @@ require 'ipaddr' # a class that creates facts based on the subnet class SubnetAttributes SUBNET_TO_ATTRIBUTES = { + '198.18.2.0/24' => { environment: 'prod', region: 'syd1', country: 'au', zone: 'common' }, # router loopbacks '198.18.13.0/24' => { environment: 'prod', region: 'syd1', country: 'au', zone: 'common' }, '198.18.14.0/24' => { environment: 'prod', region: 'syd1', country: 'au', zone: 'common' }, '198.18.15.0/24' => { environment: 'prod', region: 'syd1', country: 'au', zone: 'common' },