From 770c8cc159ef877bdf5c442c5ab478e27975a442 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Wed, 22 May 2024 22:18:32 +1000 Subject: [PATCH] feat: update hiera key for puppetdb api/sql - changed to use puppetdbapi and puppetdbsql hiera keys - updated all classes that referenced old values --- hieradata/common.yaml | 5 +++-- site/profiles/manifests/puppet/puppetboard.pp | 2 +- site/profiles/manifests/puppet/puppetdb_api.pp | 2 +- site/profiles/manifests/puppet/puppetdb_sql.pp | 2 +- site/profiles/manifests/puppet/puppetmaster.pp | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hieradata/common.yaml b/hieradata/common.yaml index b909823..89259fc 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -200,8 +200,9 @@ profiles::puppet::client::runtimeout: 3600 profiles::puppet::client::show_diff: true profiles::puppet::client::usecacheonfailure: false -profiles::puppet::puppetdb::puppetdb_host: prodinf01n04.main.unkin.net -profiles::puppet::puppetdb::postgres_host: prodinf01n05.main.unkin.net +# puppetdb +puppetdbapi: prodinf01n04.main.unkin.net +puppetdbsql: prodinf01n05.main.unkin.net prometheus::node_exporter::export_scrape_job: true prometheus::systemd_exporter::export_scrape_job: true diff --git a/site/profiles/manifests/puppet/puppetboard.pp b/site/profiles/manifests/puppet/puppetboard.pp index 6a2bbb9..4130e73 100644 --- a/site/profiles/manifests/puppet/puppetboard.pp +++ b/site/profiles/manifests/puppet/puppetboard.pp @@ -8,7 +8,7 @@ class profiles::puppet::puppetboard ( Integer $reports_count = 40, Boolean $offline_mode = true, String $default_environment = '*', - String $puppetdb_host = lookup('profiles::puppet::puppetdb::puppetdb_host'), + String $puppetdb_host = lookup('puppetdbapi'), Stdlib::AbsolutePath $basedir = '/opt/puppetboard', Stdlib::Absolutepath $virtualenv_dir = "${basedir}/venv", Stdlib::Absolutepath $settings_file = "${basedir}/settings.py", diff --git a/site/profiles/manifests/puppet/puppetdb_api.pp b/site/profiles/manifests/puppet/puppetdb_api.pp index e02db38..8c2177e 100644 --- a/site/profiles/manifests/puppet/puppetdb_api.pp +++ b/site/profiles/manifests/puppet/puppetdb_api.pp @@ -1,6 +1,6 @@ # configure the puppetdb api service class profiles::puppet::puppetdb_api ( - String $postgres_host = lookup('profiles::puppet::puppetdb::postgres_host'), + String $postgres_host = lookup('puppetdbsql'), String $listen_address = $facts['networking']['ip'], Stdlib::Absolutepath $java_bin = '/usr/bin/java', Hash $java_args = {}, diff --git a/site/profiles/manifests/puppet/puppetdb_sql.pp b/site/profiles/manifests/puppet/puppetdb_sql.pp index 5afa9a5..1765003 100644 --- a/site/profiles/manifests/puppet/puppetdb_sql.pp +++ b/site/profiles/manifests/puppet/puppetdb_sql.pp @@ -1,6 +1,6 @@ # configure the puppetdb sql service class profiles::puppet::puppetdb_sql ( - String $puppetdb_host = lookup('profiles::puppet::puppetdb::puppetdb_host'), + String $puppetdb_host = lookup('puppetdbsql'), String $listen_address = $facts['networking']['ip'], ) { diff --git a/site/profiles/manifests/puppet/puppetmaster.pp b/site/profiles/manifests/puppet/puppetmaster.pp index 79ce387..6ce7ca5 100644 --- a/site/profiles/manifests/puppet/puppetmaster.pp +++ b/site/profiles/manifests/puppet/puppetmaster.pp @@ -3,7 +3,7 @@ # This class manages the puppetmaster using the ghoneycutt-puppet module. # It manages the server settings in the puppet.conf file. class profiles::puppet::puppetmaster ( - Optional[Stdlib::Fqdn] $puppetdb_host = lookup('profiles::puppet::puppetdb::puppetdb_host', Optional[Stdlib::Fqdn], 'first', undef), + Optional[Stdlib::Fqdn] $puppetdb_host = lookup('puppetdbapi', Optional[Stdlib::Fqdn], 'first', undef), ) { if $facts['enc_role'] == 'roles::infra::puppet::master' {