Skip to content

Commit

Permalink
add docs, doc stubs and descriptions to fix validate warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zilchms committed Jan 26, 2024
1 parent ab148b5 commit 91a9a6d
Show file tree
Hide file tree
Showing 15 changed files with 211 additions and 118 deletions.
136 changes: 55 additions & 81 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#### Public Classes

* [`mongodb::client`](#mongodb--client): Class for installing a MongoDB client shell (CLI). == Parameters $ensure:: Desired ensure state of the package. $package_name:: Name of th
* [`mongodb::client`](#mongodb--client): Class for installing a MongoDB client shell (CLI).
* [`mongodb::globals`](#mongodb--globals): Class for setting cross-class global overrides. See README.md for more details.
* [`mongodb::mongos`](#mongodb--mongos): This installs a Mongo Shard daemon. See README.md for more details.
* [`mongodb::mongos::config`](#mongodb--mongos--config): PRIVATE CLASS: do not call directly
Expand All @@ -34,7 +34,7 @@

### Defined types

* [`mongodb::db`](#mongodb--db): == Class: mongodb::db Class for creating mongodb databases and users. == Parameters user - Database username. auth_mechanism - Authentic
* [`mongodb::db`](#mongodb--db): Class for creating mongodb databases and users.

### Resource types

Expand All @@ -54,13 +54,6 @@

Class for installing a MongoDB client shell (CLI).

== Parameters

$ensure:: Desired ensure state of the package.

$package_name:: Name of the package to install the client from. Default is
repository dependent.

#### Parameters

The following parameters are available in the `mongodb::client` class:
Expand All @@ -72,22 +65,21 @@ The following parameters are available in the `mongodb::client` class:

Data type: `String[1]`


Desired ensure state of the package.

Default value: `$mongodb::client::params::package_ensure`

##### <a name="-mongodb--client--package_name"></a>`package_name`

Data type: `String[1]`


Name of the package to install the client from. Default is repository dependent.

Default value: `$mongodb::client::params::package_name`

### <a name="mongodb--globals"></a>`mongodb::globals`

Class for setting cross-class global overrides. See README.md for more
details.
Class for setting cross-class global overrides. See README.md for more details.

#### Parameters

Expand Down Expand Up @@ -777,11 +769,6 @@ The following parameters are available in the `mongodb::opsmanager` class:

* [`user`](#-mongodb--opsmanager--user)
* [`group`](#-mongodb--opsmanager--group)
* [`opsmanager_url`](#-mongodb--opsmanager--opsmanager_url)
* [`opsmanager_mongo_uri`](#-mongodb--opsmanager--opsmanager_mongo_uri)
* [`ca_file`](#-mongodb--opsmanager--ca_file)
* [`pem_key_file`](#-mongodb--opsmanager--pem_key_file)
* [`pem_key_password`](#-mongodb--opsmanager--pem_key_password)
* [`ensure`](#-mongodb--opsmanager--ensure)
* [`package_name`](#-mongodb--opsmanager--package_name)
* [`package_ensure`](#-mongodb--opsmanager--package_ensure)
Expand All @@ -790,6 +777,7 @@ The following parameters are available in the `mongodb::opsmanager` class:
* [`service_name`](#-mongodb--opsmanager--service_name)
* [`download_url`](#-mongodb--opsmanager--download_url)
* [`mongo_uri`](#-mongodb--opsmanager--mongo_uri)
* [`opsmanager_url`](#-mongodb--opsmanager--opsmanager_url)
* [`client_certificate_mode`](#-mongodb--opsmanager--client_certificate_mode)
* [`from_email_addr`](#-mongodb--opsmanager--from_email_addr)
* [`reply_to_email_addr`](#-mongodb--opsmanager--reply_to_email_addr)
Expand All @@ -800,6 +788,9 @@ The following parameters are available in the `mongodb::opsmanager` class:
* [`smtp_server_port`](#-mongodb--opsmanager--smtp_server_port)
* [`ssl`](#-mongodb--opsmanager--ssl)
* [`ignore_ui_setup`](#-mongodb--opsmanager--ignore_ui_setup)
* [`ca_file`](#-mongodb--opsmanager--ca_file)
* [`pem_key_file`](#-mongodb--opsmanager--pem_key_file)
* [`pem_key_password`](#-mongodb--opsmanager--pem_key_password)
* [`user_svc_class`](#-mongodb--opsmanager--user_svc_class)
* [`snapshot_interval`](#-mongodb--opsmanager--snapshot_interval)
* [`snapshot_interval_retention`](#-mongodb--opsmanager--snapshot_interval_retention)
Expand All @@ -824,42 +815,6 @@ The group that owns the config file

Default value: `'mongodb-mms'`

##### <a name="-mongodb--opsmanager--opsmanager_url"></a>`opsmanager_url`

Data type: `Stdlib::Httpurl`

The fully qualified url where opsmanager runs. Must include the port.

Default value: `"http://${facts['networking']['fqdn']}:8080"`

##### <a name="-mongodb--opsmanager--opsmanager_mongo_uri"></a>`opsmanager_mongo_uri`

Full URI where the Ops Manager application mongodb server(s) can be found.

##### <a name="-mongodb--opsmanager--ca_file"></a>`ca_file`

Data type: `Optional[String[1]]`

Ca file for secure connection to backup agents.

Default value: `undef`

##### <a name="-mongodb--opsmanager--pem_key_file"></a>`pem_key_file`

Data type: `Optional[String[1]]`

Pem key file containing the cert and private key used for secure connections to backup agents.

Default value: `undef`

##### <a name="-mongodb--opsmanager--pem_key_password"></a>`pem_key_password`

Data type: `Optional[String[1]]`

The password to the pem key file.

Default value: `undef`

##### <a name="-mongodb--opsmanager--ensure"></a>`ensure`

Data type: `Enum['running', 'stopped']`
Expand Down Expand Up @@ -924,6 +879,14 @@ Data type: `String[1]`

Default value: `'mongodb://127.0.0.1:27017'`

##### <a name="-mongodb--opsmanager--opsmanager_url"></a>`opsmanager_url`

Data type: `Stdlib::Httpurl`

The fully qualified url where opsmanager runs. Must include the port.

Default value: `"http://${facts['networking']['fqdn']}:8080"`

##### <a name="-mongodb--opsmanager--client_certificate_mode"></a>`client_certificate_mode`

Data type: `String[1]`
Expand Down Expand Up @@ -1004,6 +967,30 @@ Data type: `Boolean`

Default value: `true`

##### <a name="-mongodb--opsmanager--ca_file"></a>`ca_file`

Data type: `Optional[String[1]]`

Ca file for secure connection to backup agents.

Default value: `undef`

##### <a name="-mongodb--opsmanager--pem_key_file"></a>`pem_key_file`

Data type: `Optional[String[1]]`

Pem key file containing the cert and private key used for secure connections to backup agents.

Default value: `undef`

##### <a name="-mongodb--opsmanager--pem_key_password"></a>`pem_key_password`

Data type: `Optional[String[1]]`

The password to the pem key file.

Default value: `undef`

##### <a name="-mongodb--opsmanager--user_svc_class"></a>`user_svc_class`

Data type: `Optional[String[1]]`
Expand Down Expand Up @@ -1111,23 +1098,23 @@ Default value: `'present'`

Data type: `Optional[String]`


Optional repo version string.

Default value: `undef`

##### <a name="-mongodb--repo--use_enterprise_repo"></a>`use_enterprise_repo`

Data type: `Boolean`


Boolean value to use enterprise repository. Defaults to false.

Default value: `false`

##### <a name="-mongodb--repo--repo_location"></a>`repo_location`

Data type: `Optional[String]`


Optional location of the repository

Default value: `undef`

Expand Down Expand Up @@ -2006,21 +1993,8 @@ Default value: `undef`

### <a name="mongodb--db"></a>`mongodb::db`

== Class: mongodb::db

Class for creating mongodb databases and users.

== Parameters

user - Database username.
auth_mechanism - Authentication mechanism. scram_sha_256 password verification is not supported. Defaults to 'scram_sha_1'.
db_name - Database name. Defaults to $name.
password_hash - Hashed password. Hex encoded md5 hash of "$username:mongo:$password".
password - Plain text user password. This is UNSAFE, use 'password_hash' instead.
roles (default: ['dbAdmin']) - array with user roles.
tries (default: 10) - The maximum amount of two second tries to wait MongoDB startup.
update_password (default: false) - Force an update of the password when scram_sha_256 is used.

#### Parameters

The following parameters are available in the `mongodb::db` defined type:
Expand All @@ -2038,61 +2012,61 @@ The following parameters are available in the `mongodb::db` defined type:

Data type: `String`


Database username.

##### <a name="-mongodb--db--auth_mechanism"></a>`auth_mechanism`

Data type: `Enum['scram_sha_1', 'scram_sha_256']`


Authentication mechanism. scram_sha_256 password verification is not supported. Defaults to 'scram_sha_1'.

Default value: `'scram_sha_1'`

##### <a name="-mongodb--db--db_name"></a>`db_name`

Data type: `String`


Database name. Defaults to $name.

Default value: `$name`

##### <a name="-mongodb--db--password_hash"></a>`password_hash`

Data type: `Optional[Variant[String[1], Sensitive[String[1]]]]`


Hashed password. Hex encoded md5 hash of "$username:mongo:$password".

Default value: `undef`

##### <a name="-mongodb--db--password"></a>`password`

Data type: `Optional[Variant[String[1], Sensitive[String[1]]]]`


Plain text user password. This is UNSAFE, use 'password_hash' instead.

Default value: `undef`

##### <a name="-mongodb--db--roles"></a>`roles`

Data type: `Array[String]`


Array with user roles. Deaults to ['dbAdmin']

Default value: `['dbAdmin']`

##### <a name="-mongodb--db--tries"></a>`tries`

Data type: `Integer[0]`


The maximum amount of two second tries to wait MongoDB startup. Defaults to 10.

Default value: `10`

##### <a name="-mongodb--db--update_password"></a>`update_password`

Data type: `Boolean`


Force an update of the password when scram_sha_256 is used. Defaults to false.

Default value: `false`

Expand All @@ -2114,7 +2088,7 @@ The following properties are available in the `mongodb_conn_validator` type.

Valid values: `present`, `absent`

The basic property that the resource should be in.
Ensurable property

Default value: `present`

Expand Down Expand Up @@ -2216,7 +2190,7 @@ The following properties are available in the `mongodb_replset` type.

Valid values: `present`

The basic property that the resource should be in.
Ensurable property

Default value: `present`

Expand Down Expand Up @@ -2270,7 +2244,7 @@ The following properties are available in the `mongodb_shard` type.

Valid values: `present`

The basic property that the resource should be in.
Ensurable property

Default value: `present`

Expand Down
1 change: 1 addition & 0 deletions lib/puppet/type/mongodb_conn_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
purposes such as monitoring."

ensurable do
desc 'Ensurable property'
defaultvalues
defaultto :present
end
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/type/mongodb_replset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@doc = 'Manage a MongoDB replicaSet'

ensurable do
desc 'Ensurable property'
defaultto :present

newvalue(:present) do
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/type/mongodb_shard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@doc = 'Manage a MongoDB Shard'

ensurable do
desc 'Ensurable property'
defaultto :present

newvalue(:present) do
Expand Down
12 changes: 5 additions & 7 deletions manifests/client.pp
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Class for installing a MongoDB client shell (CLI).
# @summary Class for installing a MongoDB client shell (CLI).
#
# == Parameters
#
# $ensure:: Desired ensure state of the package.
#
# $package_name:: Name of the package to install the client from. Default is
# repository dependent.
# @param ensure
# Desired ensure state of the package.
# @param package_name
# Name of the package to install the client from. Default is repository dependent.
#
class mongodb::client (
String[1] $ensure = $mongodb::client::params::package_ensure,
Expand Down
30 changes: 17 additions & 13 deletions manifests/db.pp
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# == Class: mongodb::db
# @summary Class for creating mongodb databases and users.
#
# Class for creating mongodb databases and users.
#
# == Parameters
#
# user - Database username.
# auth_mechanism - Authentication mechanism. scram_sha_256 password verification is not supported. Defaults to 'scram_sha_1'.
# db_name - Database name. Defaults to $name.
# password_hash - Hashed password. Hex encoded md5 hash of "$username:mongo:$password".
# password - Plain text user password. This is UNSAFE, use 'password_hash' instead.
# roles (default: ['dbAdmin']) - array with user roles.
# tries (default: 10) - The maximum amount of two second tries to wait MongoDB startup.
# update_password (default: false) - Force an update of the password when scram_sha_256 is used.
# @param user
# Database username.
# @param auth_mechanism
# Authentication mechanism. scram_sha_256 password verification is not supported. Defaults to 'scram_sha_1'.
# @param db_name
# Database name. Defaults to $name.
# @param password_hash
# Hashed password. Hex encoded md5 hash of "$username:mongo:$password".
# @param password
# Plain text user password. This is UNSAFE, use 'password_hash' instead.
# @param roles
# Array with user roles. Deaults to ['dbAdmin']
# @param tries
# The maximum amount of two second tries to wait MongoDB startup. Defaults to 10.
# @param update_password
# Force an update of the password when scram_sha_256 is used. Defaults to false.
#
define mongodb::db (
String $user,
Expand Down
Loading

0 comments on commit 91a9a6d

Please sign in to comment.