From 6472fede547fe6ef050f400c1a40b6ed4e0a8e3d Mon Sep 17 00:00:00 2001 From: Ioannis Karasavvaidis Date: Wed, 11 Sep 2024 14:25:55 +0100 Subject: [PATCH] fix(setup): update puppetdb_host to use internal compiler pool addresses - Replaced `${trusted['certname']}` with `$internal_compiler_a_pool_address` and `$internal_compiler_b_pool_address` in `puppetdb_host` for `puppet_enterprise::profile::master` class. - Applied `.filter |$_| { $_ }` to ensure non-empty values. - Removed lint ignore comments for single quote string with variables. This change ensures that the correct internal compiler pool addresses are used for the `puppetdb_host` configuration. --- manifests/setup/legacy_compiler_group.pp | 12 +++--------- manifests/setup/node_manager.pp | 12 +++--------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/manifests/setup/legacy_compiler_group.pp b/manifests/setup/legacy_compiler_group.pp index dcad98e5..870297ad 100644 --- a/manifests/setup/legacy_compiler_group.pp +++ b/manifests/setup/legacy_compiler_group.pp @@ -16,9 +16,7 @@ ], classes => { 'puppet_enterprise::profile::master' => { - # lint:ignore:single_quote_string_with_variables - 'puppetdb_host' => ['${trusted[\'certname\']}'], - # lint:endignore + 'puppetdb_host' => [$internal_compiler_a_pool_address, $internal_compiler_a_pool_address].filter |$_| { $_ }, 'puppetdb_port' => [8081], }, }, @@ -34,9 +32,7 @@ ], classes => { 'puppet_enterprise::profile::master' => { - # lint:ignore:single_quote_string_with_variables - 'puppetdb_host' => ['${trusted[\'certname\']}', $internal_compiler_b_pool_address].filter |$_| { $_ }, - # lint:endignore + 'puppetdb_host' => [$internal_compiler_b_pool_address, $internal_compiler_a_pool_address].filter |$_| { $_ }, 'puppetdb_port' => [8081], }, }, @@ -58,9 +54,7 @@ ], classes => { 'puppet_enterprise::profile::master' => { - # lint:ignore:single_quote_string_with_variables - 'puppetdb_host' => ['${trusted[\'certname\']}', $internal_compiler_a_pool_address].filter |$_| { $_ }, - # lint:endignore + 'puppetdb_host' => [$internal_compiler_a_pool_address, $internal_compiler_b_pool_address].filter |$_| { $_ }, 'puppetdb_port' => [8081], }, }, diff --git a/manifests/setup/node_manager.pp b/manifests/setup/node_manager.pp index e7074b63..f74cb217 100644 --- a/manifests/setup/node_manager.pp +++ b/manifests/setup/node_manager.pp @@ -209,9 +209,7 @@ ], classes => { 'puppet_enterprise::profile::master' => { - # lint:ignore:single_quote_string_with_variables - 'puppetdb_host' => ['${trusted[\'certname\']}'], - # lint:endignore + 'puppetdb_host' => [$internal_compiler_a_pool_address, $internal_compiler_b_pool_address].filter |$_| { $_ }, 'puppetdb_port' => [8081], }, }, @@ -229,9 +227,7 @@ ], classes => { 'puppet_enterprise::profile::master' => { - # lint:ignore:single_quote_string_with_variables - 'puppetdb_host' => ['${trusted[\'certname\']}', $internal_compiler_b_pool_address].filter |$_| { $_ }, - # lint:endignore + 'puppetdb_host' => [$internal_compiler_b_pool_address, $internal_compiler_a_pool_address].filter |$_| { $_ }, 'puppetdb_port' => [8081], }, }, @@ -255,9 +251,7 @@ ], classes => { 'puppet_enterprise::profile::master' => { - # lint:ignore:single_quote_string_with_variables - 'puppetdb_host' => ['${trusted[\'certname\']}', $internal_compiler_a_pool_address].filter |$_| { $_ }, - # lint:endignore + 'puppetdb_host' => [$internal_compiler_a_pool_address, $internal_compiler_a_pool_address].filter |$_| { $_ }, 'puppetdb_port' => [8081], }, },