101e58991c
Use inherits keyword to bring puppetboard::params into scope Use 2>&1 in install_modules to silence warnings Set puppetdb class to open port 80 when puppetboard is used Remove inherits from params check from puppet lint Change-Id: I75fc35542e9f2641bcab613d7e1aef83d9300217
51 lines
1.1 KiB
Puppet
51 lines
1.1 KiB
Puppet
# == Class: openstack_project::puppetdb
|
|
#
|
|
class openstack_project::puppetdb (
|
|
$sysadmins = [],
|
|
$puppetboard = true,
|
|
) {
|
|
|
|
# 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,
|
|
}
|
|
|
|
if $puppetboard {
|
|
$open_ports = [8081, 80]
|
|
} else {
|
|
$open_ports = [8081]
|
|
}
|
|
|
|
class { 'openstack_project::server':
|
|
iptables_public_tcp_ports => $open_ports,
|
|
sysadmins => $sysadmins,
|
|
}
|
|
|
|
class { 'puppetdb::database::postgresql':
|
|
require => [User['postgres'],
|
|
Class['openstack_project::base'],],
|
|
}
|
|
|
|
class { '::puppetdb::server':
|
|
database_host => 'localhost',
|
|
ssl_listen_address => '0.0.0.0', # works for ipv6 too
|
|
require => [ User['postgres'],
|
|
Class['puppetdb::database::postgresql'],],
|
|
}
|
|
|
|
if $puppetboard {
|
|
class { 'openstack_project::puppetboard': }
|
|
}
|
|
|
|
}
|