Merge pull request #119 from nibalizer/option_disable_firewall

Adding option to disable management of the firewall
This commit is contained in:
Ken Barber 2014-02-18 21:48:55 +00:00
commit 1c94d83dce
2 changed files with 25 additions and 10 deletions

View file

@ -412,6 +412,10 @@ Creates a user for access the database. Defaults to `puppetdb`.
Sets the password for the database user above. Defaults to `puppetdb`.
####`manage_firewall`
Conditionally manages the firewall for the PuppetDB host. Defaults to `true`.
Implementation
---------------

View file

@ -27,6 +27,7 @@ class puppetdb::server(
$puppetdb_service = $puppetdb::params::puppetdb_service,
$puppetdb_service_status = $puppetdb::params::puppetdb_service_status,
$confdir = $puppetdb::params::confdir,
$manage_firewall = true,
$java_args = {}
) inherits puppetdb::params {
@ -70,12 +71,15 @@ class puppetdb::server(
notify => Service[$puppetdb_service],
}
if $manage_firewall {
class { 'puppetdb::server::firewall':
http_port => $listen_port,
open_http_port => $open_listen_port,
ssl_port => $ssl_listen_port,
open_ssl_port => $open_ssl_listen_port,
}
}
class { 'puppetdb::server::database_ini':
database => $database,
@ -135,9 +139,16 @@ class puppetdb::server(
enable => $service_enabled,
}
if $manage_firewall {
Package[$puppetdb_package] ->
Class['puppetdb::server::firewall'] ->
Class['puppetdb::server::database_ini'] ->
Class['puppetdb::server::jetty_ini'] ->
Service[$puppetdb_service]
} else {
Package[$puppetdb_package] ->
Class['puppetdb::server::database_ini'] ->
Class['puppetdb::server::jetty_ini'] ->
Service[$puppetdb_service]
}
}