Skip to content

Commit 0cf9632

Browse files
Drew BlessingDrew Blessing
authored andcommitted
17594 - Fixes suggested by cprice-puppet
1 parent 0afc276 commit 0cf9632

4 files changed

Lines changed: 11 additions & 15 deletions

File tree

manifests/init.pp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@
2828
# ['ssl_listen_port'] - The port on which the puppetdb web server should
2929
# accept HTTPS requests (defaults to 8081).
3030
# ['open_ssl_listen_port'] - If true, open the ssl listen port on the firewall.
31-
# (defaults to false).
31+
# (defaults to true).
3232
# ['database'] - Which database backend to use; legal values are
3333
# `postgres` (default) or `embedded`. (The `embedded`
3434
# db can be used for very small installations or for
3535
# testing, but is not recommended for use in production
3636
# environments. For more info, see the puppetdb docs.)
37-
# ['database_host'] - The hostname or IP address of the database server.
38-
# (defaults to `localhost`; ignored for `embedded` db)
3937
# ['database_port'] - The port that the database server listens on.
4038
# (defaults to `5432`; ignored for `embedded` db)
4139
# ['database_username'] - The name of the database user to connect as.
@@ -50,10 +48,6 @@
5048
# number, 'present', or 'latest'. (defaults to
5149
# 'present')
5250
# ['puppetdb_service'] - The name of the puppetdb service.
53-
# ['postgres_listen_addresses'] - The addresses for postgres to listen on.
54-
# (defaults to 'localhost'. '*' = all)
55-
# ['open_postgres_port'] - If true, open the postgres listen port on the firewall.
56-
# (defaults to false).
5751
# ['manage_redhat_firewall'] - DEPRECATED: Use open_ssl_listen_port instead.
5852
# boolean indicating whether or not the module
5953
# should open a port in the firewall on redhat-based
@@ -83,15 +77,13 @@
8377
$ssl_listen_port = $puppetdb::params::ssl_listen_port,
8478
$open_ssl_listen_port = $puppetdb::params::open_ssl_listen_port,
8579
$database = $puppetdb::params::database,
86-
$database_host = $puppetdb::params::database_host,
8780
$database_port = $puppetdb::params::database_port,
8881
$database_username = $puppetdb::params::database_username,
8982
$database_password = $puppetdb::params::database_password,
9083
$database_name = $puppetdb::params::database_name,
9184
$puppetdb_package = $puppetdb::params::puppetdb_package,
9285
$puppetdb_version = $puppetdb::params::puppetdb_version,
9386
$puppetdb_service = $puppetdb::params::puppetdb_service,
94-
$postgres_listen_addresses = $puppetdb::params::postgres_listen_addresses,
9587
$open_postgres_port = $puppetdb::params::open_postgres_port,
9688
$manage_redhat_firewall = $puppetdb::params::manage_redhat_firewall,
9789
$confdir = $puppetdb::params::confdir
@@ -109,7 +101,6 @@
109101
ssl_listen_port => $ssl_listen_port,
110102
open_ssl_listen_port => $open_ssl_listen_port,
111103
database => $database,
112-
database_host => $database_host,
113104
database_port => $database_port,
114105
database_username => $database_username,
115106
database_password => $database_password,

manifests/params.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
$open_listen_port = false
1717
$ssl_listen_address = $::clientcert
1818
$ssl_listen_port = '8081'
19-
$open_ssl_listen_port = false
19+
$open_ssl_listen_port = true
2020
$postgres_listen_addresses = 'localhost'
21-
$open_postgres_port = false
21+
$open_postgres_port = true
2222

2323
$database = 'postgres'
2424

manifests/server.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# ['ssl_listen_port'] - The port on which the puppetdb web server should
3636
# accept HTTPS requests (defaults to 8081).
3737
# ['open_ssl_listen_port'] - If true, open the ssl listen port on the firewall.
38-
# (defaults to false).
38+
# (defaults to true).
3939
# ['database'] - Which database backend to use; legal values are
4040
# `postgres` (default) or `embedded`. (The `embedded`
4141
# db can be used for very small installations or for

manifests/server/firewall.pp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,13 @@
4545
}
4646

4747
if ($open_ssl_port or $manage_redhat_firewall) {
48-
firewall { "${ssl_port} accept - puppetdb":
49-
port => $ssl_port,
48+
if ($ssl_port) {
49+
$final_ssl_port = $ssl_port
50+
} else {
51+
$final_ssl_port = $port
52+
}
53+
firewall { "${final_ssl_port} accept - puppetdb":
54+
port => $final_ssl_port,
5055
proto => 'tcp',
5156
action => 'accept',
5257
}

0 commit comments

Comments
 (0)