Skip to content

Commit 74564f1

Browse files
committed
add missing parameter documentation to database::postgresql class
1 parent 1387f21 commit 74564f1

File tree

2 files changed

+82
-48
lines changed

2 files changed

+82
-48
lines changed

REFERENCE.md

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -964,19 +964,18 @@ create the PuppetDB postgresql database
964964
The following parameters are available in the `puppetdb::database::postgresql` class:
965965

966966
* [`listen_addresses`](#-puppetdb--database--postgresql--listen_addresses)
967+
* [`puppetdb_server`](#-puppetdb--database--postgresql--puppetdb_server)
967968
* [`database_name`](#-puppetdb--database--postgresql--database_name)
968969
* [`database_username`](#-puppetdb--database--postgresql--database_username)
969970
* [`database_password`](#-puppetdb--database--postgresql--database_password)
971+
* [`database_port`](#-puppetdb--database--postgresql--database_port)
972+
* [`manage_database`](#-puppetdb--database--postgresql--manage_database)
970973
* [`manage_server`](#-puppetdb--database--postgresql--manage_server)
971-
* [`test_url`](#-puppetdb--database--postgresql--test_url)
972974
* [`manage_package_repo`](#-puppetdb--database--postgresql--manage_package_repo)
973975
* [`postgres_version`](#-puppetdb--database--postgresql--postgres_version)
974-
* [`puppetdb_server`](#-puppetdb--database--postgresql--puppetdb_server)
975-
* [`database_port`](#-puppetdb--database--postgresql--database_port)
976-
* [`manage_database`](#-puppetdb--database--postgresql--manage_database)
977976
* [`postgresql_ssl_on`](#-puppetdb--database--postgresql--postgresql_ssl_on)
978-
* [`postgresql_ssl_key_path`](#-puppetdb--database--postgresql--postgresql_ssl_key_path)
979977
* [`postgresql_ssl_cert_path`](#-puppetdb--database--postgresql--postgresql_ssl_cert_path)
978+
* [`postgresql_ssl_key_path`](#-puppetdb--database--postgresql--postgresql_ssl_key_path)
980979
* [`postgresql_ssl_ca_cert_path`](#-puppetdb--database--postgresql--postgresql_ssl_ca_cert_path)
981980
* [`read_database_username`](#-puppetdb--database--postgresql--read_database_username)
982981
* [`read_database_password`](#-puppetdb--database--postgresql--read_database_password)
@@ -993,6 +992,14 @@ config option. Use a `*` to allow connections on any accessible address.
993992

994993
Default value: `$puppetdb::params::database_host`
995994

995+
##### <a name="-puppetdb--database--postgresql--puppetdb_server"></a>`puppetdb_server`
996+
997+
Data type: `Any`
998+
999+
Hostname or IP address to configure for SSL rules.
1000+
1001+
Default value: `$puppetdb::params::puppetdb_server`
1002+
9961003
##### <a name="-puppetdb--database--postgresql--database_name"></a>`database_name`
9971004

9981005
Data type: `Any`
@@ -1017,6 +1024,22 @@ Sets the password for the database user above. Defaults to `puppetdb`.
10171024

10181025
Default value: `$puppetdb::params::database_password`
10191026

1027+
##### <a name="-puppetdb--database--postgresql--database_port"></a>`database_port`
1028+
1029+
Data type: `Any`
1030+
1031+
The port that the database server listens on. Defaults to `5432`.
1032+
1033+
Default value: `$puppetdb::params::database_port`
1034+
1035+
##### <a name="-puppetdb--database--postgresql--manage_database"></a>`manage_database`
1036+
1037+
Data type: `Any`
1038+
1039+
If true, the PostgreSQL database will be managed by this module. Defaults to `true`.
1040+
1041+
Default value: `$puppetdb::params::manage_database`
1042+
10201043
##### <a name="-puppetdb--database--postgresql--manage_server"></a>`manage_server`
10211044

10221045
Data type: `Any`
@@ -1027,11 +1050,6 @@ to `true`. If set to `false`, this class will create the database and user via
10271050

10281051
Default value: `$puppetdb::params::manage_dbserver`
10291052

1030-
##### <a name="-puppetdb--database--postgresql--test_url"></a>`test_url`
1031-
1032-
The URL to use for testing if the PuppetDB instance is running. Defaults to
1033-
`/pdb/meta/v1/version`.
1034-
10351053
##### <a name="-puppetdb--database--postgresql--manage_package_repo"></a>`manage_package_repo`
10361054

10371055
Data type: `Any`
@@ -1050,83 +1068,66 @@ postgres. Defaults to `11` with PuppetDB version 7.0.0 or newer, and `9.6` in ol
10501068

10511069
Default value: `$puppetdb::params::postgres_version`
10521070

1053-
##### <a name="-puppetdb--database--postgresql--puppetdb_server"></a>`puppetdb_server`
1054-
1055-
Data type: `Any`
1056-
1057-
1058-
1059-
Default value: `$puppetdb::params::puppetdb_server`
1060-
1061-
##### <a name="-puppetdb--database--postgresql--database_port"></a>`database_port`
1062-
1063-
Data type: `Any`
1064-
1065-
1066-
1067-
Default value: `$puppetdb::params::database_port`
1068-
1069-
##### <a name="-puppetdb--database--postgresql--manage_database"></a>`manage_database`
1070-
1071-
Data type: `Any`
1072-
1073-
1074-
1075-
Default value: `$puppetdb::params::manage_database`
1076-
10771071
##### <a name="-puppetdb--database--postgresql--postgresql_ssl_on"></a>`postgresql_ssl_on`
10781072

10791073
Data type: `Any`
10801074

1081-
1075+
If `true`, it configures SSL connections between PuppetDB and the PostgreSQL database.
1076+
Defaults to `false`.
10821077

10831078
Default value: `$puppetdb::params::postgresql_ssl_on`
10841079

1085-
##### <a name="-puppetdb--database--postgresql--postgresql_ssl_key_path"></a>`postgresql_ssl_key_path`
1080+
##### <a name="-puppetdb--database--postgresql--postgresql_ssl_cert_path"></a>`postgresql_ssl_cert_path`
10861081

10871082
Data type: `Any`
10881083

1084+
Path to the Postgresql SSL certificate.
10891085

1086+
Default value: `$puppetdb::params::postgresql_ssl_cert_path`
10901087

1091-
Default value: `$puppetdb::params::postgresql_ssl_key_path`
1092-
1093-
##### <a name="-puppetdb--database--postgresql--postgresql_ssl_cert_path"></a>`postgresql_ssl_cert_path`
1088+
##### <a name="-puppetdb--database--postgresql--postgresql_ssl_key_path"></a>`postgresql_ssl_key_path`
10941089

10951090
Data type: `Any`
10961091

1092+
Path to the Postgresql SSL key.
10971093

1098-
1099-
Default value: `$puppetdb::params::postgresql_ssl_cert_path`
1094+
Default value: `$puppetdb::params::postgresql_ssl_key_path`
11001095

11011096
##### <a name="-puppetdb--database--postgresql--postgresql_ssl_ca_cert_path"></a>`postgresql_ssl_ca_cert_path`
11021097

11031098
Data type: `Any`
11041099

1105-
1100+
Path to the Postgresql SSL CA.
11061101

11071102
Default value: `$puppetdb::params::postgresql_ssl_ca_cert_path`
11081103

11091104
##### <a name="-puppetdb--database--postgresql--read_database_username"></a>`read_database_username`
11101105

11111106
Data type: `Any`
11121107

1113-
1108+
The name of the read database user to connect as. Defaults to `puppetdb-read`. This
1109+
option is supported in PuppetDB >= 1.6.
11141110

11151111
Default value: `$puppetdb::params::read_database_username`
11161112

11171113
##### <a name="-puppetdb--database--postgresql--read_database_password"></a>`read_database_password`
11181114

11191115
Data type: `Any`
11201116

1121-
1117+
The password for the read database user. Defaults to `puppetdb-read`. This option is
1118+
supported in PuppetDB >= 1.6.
11221119

11231120
Default value: `$puppetdb::params::read_database_password`
11241121

11251122
##### <a name="-puppetdb--database--postgresql--read_database_host"></a>`read_database_host`
11261123

11271124
Data type: `Any`
11281125

1126+
*This parameter must be set to use another PuppetDB instance for queries.*
11291127

1128+
The hostname or IP address of the read database server. If set to `undef`, and
1129+
`manage_database` is set to `true`, it will use the value of the `database_host`
1130+
parameter. This option is supported in PuppetDB >= 1.6.
11301131

11311132
Default value: `$puppetdb::params::read_database_host`
11321133

manifests/database/postgresql.pp

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
# to `localhost`. This parameter maps directly to PostgreSQL's `listen_addresses`
77
# config option. Use a `*` to allow connections on any accessible address.
88
#
9+
# @param puppetdb_server
10+
# Hostname or IP address to configure for SSL rules.
11+
#
912
# @param database_name
1013
# Sets the name of the database. Defaults to `puppetdb`.
1114
#
@@ -15,15 +18,17 @@
1518
# @param database_password
1619
# Sets the password for the database user above. Defaults to `puppetdb`.
1720
#
21+
# @param database_port
22+
# The port that the database server listens on. Defaults to `5432`.
23+
#
24+
# @param manage_database
25+
# If true, the PostgreSQL database will be managed by this module. Defaults to `true`.
26+
#
1827
# @param manage_server
1928
# Conditionally manages the PostgreSQL server via `postgresql::server`. Defaults
2029
# to `true`. If set to `false`, this class will create the database and user via
2130
# `postgresql::server::db` but not attempt to install or manage the server itself.
2231
#
23-
# @param test_url
24-
# The URL to use for testing if the PuppetDB instance is running. Defaults to
25-
# `/pdb/meta/v1/version`.
26-
#
2732
# @param manage_package_repo
2833
# If `true`, the official postgresql.org repo will be added and postgres won't
2934
# be installed from the regular repository. Defaults to `true`.
@@ -32,6 +37,34 @@
3237
# If the postgresql.org repo is installed, you can install several versions of
3338
# postgres. Defaults to `11` with PuppetDB version 7.0.0 or newer, and `9.6` in older versions.
3439
#
40+
# @param postgresql_ssl_on
41+
# If `true`, it configures SSL connections between PuppetDB and the PostgreSQL database.
42+
# Defaults to `false`.
43+
#
44+
# @param postgresql_ssl_cert_path
45+
# Path to the Postgresql SSL certificate.
46+
#
47+
# @param postgresql_ssl_key_path
48+
# Path to the Postgresql SSL key.
49+
#
50+
# @param postgresql_ssl_ca_cert_path
51+
# Path to the Postgresql SSL CA.
52+
#
53+
# @param read_database_username
54+
# The name of the read database user to connect as. Defaults to `puppetdb-read`. This
55+
# option is supported in PuppetDB >= 1.6.
56+
#
57+
# @param read_database_password
58+
# The password for the read database user. Defaults to `puppetdb-read`. This option is
59+
# supported in PuppetDB >= 1.6.
60+
#
61+
# @param read_database_host
62+
# *This parameter must be set to use another PuppetDB instance for queries.*
63+
#
64+
# The hostname or IP address of the read database server. If set to `undef`, and
65+
# `manage_database` is set to `true`, it will use the value of the `database_host`
66+
# parameter. This option is supported in PuppetDB >= 1.6.
67+
#
3568
class puppetdb::database::postgresql (
3669
$listen_addresses = $puppetdb::params::database_host,
3770
$puppetdb_server = $puppetdb::params::puppetdb_server,

0 commit comments

Comments
 (0)