- install modules required
- puppetdb
- postgresql
- puppetboard
- python
- create new profiles to manage each item (puppetdb/puppetboard)
- added puppetdb role
- include the puppetdb::master::config in puppetmaster role
- re-organised the puppetfile
- moved python to be managed by the python module
- added postgresql to list of managed repos
39 lines
1.2 KiB
Puppet
39 lines
1.2 KiB
Puppet
# profiles::puppet::puppetdb
|
|
#
|
|
# This class manages the installation and configuration of PuppetDB
|
|
# and its underlying PostgreSQL database on a single node.
|
|
#
|
|
# It makes use of the puppetlabs-puppetdb module to manage both the
|
|
# PuppetDB service and its PostgreSQL backend.
|
|
#
|
|
class profiles::puppet::puppetdb(
|
|
String $puppetdb_host,
|
|
String $listen_address = $facts['networking']['ip'],
|
|
) {
|
|
|
|
# disable the postgresql dnf module for el8+
|
|
if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] >= '8' {
|
|
# based on https://github.com/puppetlabs/puppetlabs-postgresql/blob/main/manifests/dnfmodule.pp
|
|
package { 'postgresql dnf module':
|
|
ensure => 'disabled',
|
|
name => 'postgresql',
|
|
provider => 'dnfmodule',
|
|
before => Class['puppetdb::database::postgresql'],
|
|
}
|
|
}
|
|
|
|
# Install and configure PostgreSQL for PuppetDB
|
|
class { 'puppetdb::database::postgresql':
|
|
listen_addresses => $listen_address,
|
|
postgresql_ssl_on => false,
|
|
postgres_version => '15',
|
|
puppetdb_server => $puppetdb_host,
|
|
before => Class['puppetdb::server'],
|
|
}
|
|
|
|
class { 'puppetdb::server':
|
|
database_host => $listen_address,
|
|
postgresql_ssl_on => false,
|
|
}
|
|
}
|