system-config/modules/openstack_project/manifests/puppetdb.pp
Spencer Krum 1d540a2ecb Add directory resources to puppetdb module
I think that the puppetdb module expects the package to do this work,
and that's why it doesn't do this for us. There may also be an issue
with the puppetdb module setting up a config file under /etc and the
puppetdb application looking for a config file under /opt/puppetlabs

Change-Id: Ide2b3a5841ac07fd7e154e8d26ce0b036f734a41
2016-05-01 12:59:41 -07:00

62 lines
1.6 KiB
Puppet

# == Class: openstack_project::puppetdb
#
class openstack_project::puppetdb (
$puppetboard = true,
$version = '2.3.8-1puppetlabs1',
) {
# 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 { 'puppetdb::database::postgresql':
require => [User['postgres'],
Class['openstack_project::template'],],
}
class { '::puppetdb::server':
database_host => 'localhost',
ssl_listen_address => '0.0.0.0', # works for ipv6 too
java_args => { '-Xmx' => '512m', '-Xms' => '256m' },
puppetdb_version => $version,
require => [ User['postgres'],
Class['puppetdb::database::postgresql'],],
}
if $puppetboard {
class { 'openstack_project::puppetboard': }
}
if versioncmp($version, '2.3.8') > 0 {
file { '/etc/puppetdb/':
ensure => directory,
before => Class['::puppetdb::server'],
}
file { '/etc/puppetdb/conf.d/':
ensure => directory,
before => Class['::puppetdb::server'],
}
apt::source { 'puppetlabs-pc1':
location => 'http://apt.puppetlabs.com',
repos => 'PC1',
key => {
'id' =>'47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',
'server' => 'pgp.mit.edu',
},
before => Class['::puppetdb::server'],
}
}
}