This brings in the puppetdb module via install_modules.sh and
creates a new class, openstack_project::puppetdb. It was modeled
on openstack_project::puppetmaster. Note that this will not enable
puppetdb to participate in the Puppet ecosystem yet. An additional
class will have to be added to the master:
class { 'puppetdb::master::config':
puppetdb_server => 'puppetdb',
}
I will leave this out of this change so we can bring up puppetdb in
stages.
This paves the way for puppetboard to be brought online.
Change-Id: I8194372bd31e08f12a815fd04dcdf338565ed911
37 lines
907 B
Puppet
37 lines
907 B
Puppet
# == Class: openstack_project::puppetdb
|
|
#
|
|
class openstack_project::puppetdb (
|
|
$sysadmins = [],
|
|
) {
|
|
|
|
# The puppetlabs postgres module does not manage the postgres user
|
|
# and group for us. Create them here to ensure concat can create
|
|
# dirs and files owned by this user and group.
|
|
user { 'postgres':
|
|
ensure => present,
|
|
gid => 'postgres',
|
|
system => true,
|
|
require => Group['postgres'],
|
|
}
|
|
|
|
group { 'postgres':
|
|
ensure => present,
|
|
system => true,
|
|
}
|
|
|
|
class { 'openstack_project::server':
|
|
iptables_public_tcp_ports => [8081],
|
|
sysadmins => $sysadmins,
|
|
}
|
|
|
|
class { 'puppetdb::database::postgresql':
|
|
require => [User['postgres'], Class['openstack_project::base'],],
|
|
}
|
|
|
|
class { '::puppetdb::server':
|
|
database_host => 'localhost',
|
|
require => [ User['postgres'], Class['puppetdb::database::postgresql'],],
|
|
}
|
|
|
|
}
|