Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define multiple puppetdb servers in hiera #386

Open
Szparki opened this issue Jan 31, 2024 · 2 comments
Open

Define multiple puppetdb servers in hiera #386

Szparki opened this issue Jan 31, 2024 · 2 comments

Comments

@Szparki
Copy link

Szparki commented Jan 31, 2024

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

@Szparki
Copy link
Author

Szparki commented Jan 31, 2024

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 
  }

@alexjfisher
Copy link
Contributor

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 
  }

Didn't this break the puppetdb_conn_validator type?

puppetdb_server => $conn_puppetdb_server,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants