Define multiple puppetdb servers in hiera
Use Case
As far as I know as of now you can only define a single PuppetDB server in hieradata, I have two PuppetDB servers for the same Puppet Master. It would be good to support two or more.
Describe the Solution You Would Like
support something like the following in hiera:
puppet_db:
server
- server1
- server2
- server N
Then in the manifest file we can do the following:
$puppet_db = hiera_hash('puppet_db')
class { 'puppet::server::puppetdb':
* => $puppet_db
}
Describe Alternatives You've Considered
Not managing /etc/puppetlabs/puppet/puppetdb.conf with this module
Additional Context
Maybe there is a solution for this that I couldn't find in the documentation
I was able to do a workaround using the the following in hieradata:
puppet_db:
puppetdb_server: 'server1:8081/,https://server2
puppetdb_port: 8081
And using puppetdb::master::config class in manifest:
class { 'puppetdb::master::config':
* => $puppet_db
}
I was able to do a workaround using the the following in hieradata:
puppet_db: puppetdb_server: 'server1:8081/,https://server2 puppetdb_port: 8081And using
puppetdb::master::configclass in manifest:class { 'puppetdb::master::config': * => $puppet_db }
Didn't this break the puppetdb_conn_validator type? https://github.com/puppetlabs/puppetlabs-puppetdb/blob/143dc4289ab6f1854e1cb0a8e92f57780ee06235/manifests/master/config.pp#L175