mongodb::client
mongodb::globals
: Class for setting cross-class global overrides.mongodb::mongos
: This installs a Mongo Shard daemon.mongodb::opsmanager
mongodb::replset
: Wrapper class useful for hiera based deploymentsmongodb::server
: This installs a MongoDB server.mongodb::shardsvr
: Wrapper class useful for hiera based deployments
mongodb::mongos::config
: Manages mongos configmongodb::mongos::install
: Installs mongosmongodb::mongos::service
: Manages the mongos servicemongodb::repo
: Manages the mongodb repositorymongodb::repo::apt
: This is a repo class for aptmongodb::repo::yum
: This is a repo class for yummongodb::repo::zypper
: This is a repo class for zyppermongodb::server::config
: Manages mongod configmongodb::server::install
: Manages the mongod packagemongodb::server::service
: Manages the mongos service
mongodb::db
: Class for creating mongodb databases and users.
mongodb_conn_validator
: Verify that a connection can be successfully established between a node and the mongodb server. Its primary use is as a precondition to prevmongodb_database
: Manage MongoDB databases.mongodb_replset
: Manage a MongoDB replicaSetmongodb_shard
: Manage a MongoDB Shardmongodb_user
: Manage a MongoDB user. This includes management of users password as well as privileges.
mongodb_password
: Get the mongodb password hash from the clear text password.
The mongodb::client class.
The following parameters are available in the mongodb::client
class:
Data type: String[1]
Used to ensure that the package is installed, or that the package is absent/purged
Default value: pick($mongodb::globals::client_version, 'present')
Data type: String[1]
This setting can be used to specify the name of the package that should be installed. If not specified, the module will use whatever service name is the default for your OS distro.
Default value: 'mongodb-mongosh'
Class for setting cross-class global overrides.
class {'mongodb::globals':
manage_package_repo => true,
repo_version => '6.0',
}
-> class {'mongodb::client': }
-> class {'mongodb::server': }
class {'mongodb::globals':
manage_package_repo => true,
repo_version => '6.0',
use_enterprise_repo => true,
}
-> class {'mongodb::client': }
-> class {'mongodb::server': }
class {'mongodb::globals':
manage_package_repo => true,
repo_location => 'https://example.com/repo',
keyring_location => 'https://example.com/keyring.asc'
}
-> class {'mongodb::client': }
-> class {'mongodb::server': }
class {'mongodb::globals':
manage_package_repo => false,
}
-> class {'mongodb::server': }
-> class {'mongodb::client': }
The following parameters are available in the mongodb::globals
class:
version
client_version
manage_package_repo
repo_version
use_enterprise_repo
repo_location
repo_proxy
keyring_location
proxy_username
proxy_password
Data type: Optional[String[1]]
The version of MonogDB to install/manage.
If not specified, the module will ensure packages with present
.
Default value: undef
Data type: Optional[String[1]]
The version of MongoDB Shell to install/manage.
If not specified, the module will ensure packages with present
.
Default value: undef
Data type: Boolean
Whether to manage MongoDB software repository.
Default value: true
Data type: String[1]
The version of the package repo.
Default value: '5.0'
Data type: Boolean
When manage_package_repo is set to true, this setting indicates if it will use the Community Edition (false, the default) or the Enterprise one (true).
Default value: false
Data type: Optional[String]
This setting can be used to override the default MongoDB repository location. If not specified, the module will use the default repository for your OS distro.
Default value: undef
Data type: Optional[String]
This will allow you to set a proxy for your repository in case you are behind a corporate firewall. Currently this is only supported with yum repositories
Default value: undef
Data type: Optional[String]
When repo_location
is used for an apt repository this setting can be used for the keyring
file to download.
Default value: undef
Data type: Optional[String]
This sets the username for the proxyserver, should authentication be required.
Default value: undef
Data type: Optional[String]
This sets the password for the proxyserver, should authentication be required
Default value: undef
This class should only be used if you want to implement sharding within your mongodb deployment. This class allows you to configure the mongos daemon (responsible for routing) on your platform.
}
class {'mongodb::mongos' :
configdb => ['configsvr1.example.com:27018'],
The following parameters are available in the mongodb::mongos
class:
config
config_content
config_template
configdb
config_data
service_manage
service_provider
service_name
service_user
service_group
service_template
service_enable
service_ensure
service_status
package_ensure
package_name
unixsocketprefix
pidfilepath
logpath
fork
bind_ip
port
restart
Data type: Stdlib::Absolutepath
Path of the config file. If not specified, the module will use the default for your OS distro.
Default value: '/etc/mongos.conf'
Data type: Optional[String[1]]
Config content if the default doesn't match one needs.
Default value: undef
Data type: Optional[String[1]]
Path to the config template if the default doesn't match one needs.
Default value: undef
Data type: Variant[String[1], Array[String[1]]]
Array of the config servers IP addresses the mongos should connect to.
Default value: '127.0.0.1:27019'
Data type: Optional[Hash]
Hash containing key-value pairs to allow for additional configuration options to be set in user-provided template.
Default value: undef
Data type: Boolean
Whether or not the MongoDB sharding service resource should be part of the catalog.
Default value: true
Data type: Optional[String]
This setting can be used to override the default Mongos service provider. If not specified, the module will use whatever service provider is the default for your OS distro.
Default value: undef
Data type: String[1]
This setting can be used to override the default Mongos service name. If not specified, the module will use whatever service name is the default for your OS distro.
Default value: 'mongos'
Data type: String[1]
The user used by Systemd for running the service. If not specified, the module will use the default for your OS distro.
Data type: String[1]
The group used by Systemd for running the service If not specified, the module will use the default for your OS distro.
Data type: String[1]
Path to the service template if the default doesn't match one needs.
Default value: 'mongodb/mongos/mongos.service-dropin.epp'
Data type: Boolean
This setting can be used to specify if the service should be enable at boot
Default value: true
Data type: Stdlib::Ensure::Service
This setting can be used to specify if the service should be running
Default value: 'running'
Data type: Optional[String]
This setting can be used to override the default status check command for your Mongos service. If not specified, the module will use whatever service name is the default for your OS distro.
Default value: undef
Data type: String[1]
This setting can be used to specify if puppet should install the package or not
Default value: pick($mongodb::globals::version, 'present')
Data type: String
This setting can be used to specify the name of the package that should be installed. If not specified, the module will use whatever service name is the default for your OS distro.
Default value: "mongodb-${mongodb::globals::edition}-mongos"
Data type: Stdlib::Absolutepath
The path for the UNIX socket. If this option has no value, the mongos process creates a socket with /tmp as a prefix.
Default value: '/var/run/mongodb'
Data type: Stdlib::Absolutepath
Specify a file location to hold the PID or process ID of the mongod process. If not specified, the module will use the default for your OS distro.
Default value: '/var/run/mongodb/mongos.pid'
Data type: Variant[Boolean, Stdlib::Absolutepath]
Specify the path to a file name for the log file that will hold all diagnostic logging information. Unless specified, mongod will output all log information to the standard output.
Default value: '/var/log/mongodb/mongos.log'
Data type: Boolean
Set to true to fork server process at launch time. The default setting depends on the operating system.
Default value: true
Data type: Optional[Array[Stdlib::IP::Address]]
Set this option to configure the mongod or mongos process to bind to and listen for connections from applications on this address. If not specified, the module will use the default for your OS distro.
Default value: undef
Data type: Optional[Stdlib::Port]
Specifies a TCP port for the server instance to listen for client connections.
Default value: undef
Data type: Boolean
Specifies whether the service should be restarted on config changes.
Default value: true
The mongodb::opsmanager class.
The following parameters are available in the mongodb::opsmanager
class:
pem_key_password
user_svc_class
snapshot_interval
snapshot_interval_retention
snapshot_daily_retention
snapshot_weekly_retention
snapshot_monthly_retention
versions_directory
user
group
ensure
package_name
package_ensure
service_enable
service_manage
service_name
download_url
mongo_uri
opsmanager_url
client_certificate_mode
from_email_addr
reply_to_email_addr
admin_email_addr
email_dao_class
mail_transport
smtp_server_hostname
smtp_server_port
ssl
ignore_ui_setup
ca_file
pem_key_file
Data type: Optional[String[1]]
The password to the pem key file.
Default value: undef
Data type: Optional[String[1]]
The user svc class Default: com.xgen.svc.mms.svc.user.UserSvcDb External Source: com.xgen.svc.mms.svc.user.UserSvcCrowd Internal Database: com.xgen.svc.mms.svc.user.UserSvcDb
Default value: undef
Data type: Optional[Integer]
The snapshot interval to use
Default value: undef
Data type: Optional[Integer]
The snapshot interval retention period
Default value: undef
Data type: Optional[Integer]
The dayly snapshot interval retention period
Default value: undef
Data type: Optional[Integer]
The weekly snapshot interval retention period
Default value: undef
Data type: Optional[Integer]
The monthly snapshot interval retention period
Default value: undef
Data type: Optional[Integer]
The directory where to store the snapshot versions
Default value: undef
Data type: String[1]
Default value: 'mongodb-mms'
Data type: String[1]
Default value: 'mongodb-mms'
Data type: Enum['running', 'stopped']
Default value: 'running'
Data type: String[1]
Default value: 'mongodb-mms'
Data type: String[1]
Default value: 'present'
Data type: Boolean
Default value: true
Data type: Boolean
Default value: true
Data type: String[1]
Default value: 'mongodb-mms'
Data type: Stdlib::Httpurl
Default value: 'https://downloads.mongodb.com/on-prem-mms/rpm/mongodb-mms-4.0.1.50101.20180801T1117Z-1.x86_64.rpm'
Data type: String[1]
Default value: 'mongodb://127.0.0.1:27017'
Data type: Stdlib::Httpurl
Default value: "http://${facts['networking']['fqdn']}:8080"
Data type: String[1]
Default value: 'None'
Data type: String[1]
Default value: '[email protected]'
Data type: String[1]
Default value: '[email protected]'
Data type: String[1]
Default value: '[email protected]'
Data type: String[1]
Default value: 'com.xgen.svc.core.dao.email.JavaEmailDao'
Data type: Enum['smtp','smtps']
Default value: 'smtp'
Data type: Stdlib::Host
Default value: 'smtp.example.com'
Data type: Stdlib::Port
Default value: 25
Data type: Boolean
Default value: false
Data type: Boolean
Default value: true
Data type: Optional[String[1]]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Wrapper class useful for hiera based deployments
mongodb::replset::sets:
replicaset01:
ensure: present
members:
- member01.example.com:27017
- member02.example.com:27017
- member03.example.com:27017
The following parameters are available in the mongodb::replset
class:
Data type: Any
Hash of attributes as described in the mongodb_replset custom type
Default value: undef
Most of the parameters manipulate the mongod.conf file.
For more details about configuration parameters consult the MongoDB Configuration File Options.
This setting can be used to specify if the service should be running.
The following parameters are available in the mongodb::server
class:
ensure
user
group
config
dbpath
dbpath_fix
pidfilemode
pidfilepath
manage_pidfile
rcfile
service_manage
service_manage
service_name
service_provider
service_status
service_enable
service_ensure
package_ensure
package_name
logpath
bind_ip
ipv6
logappend
system_logrotate
fork
port
journal
smallfiles
cpu
auth
verbose
verbositylevel
objcheck
quota
quotafiles
diaglog
directoryperdb
profile
maxconns
oplog_size
nohints
nohttpinterface
noscripting
notablescan
noprealloc
nssize
mms_token
mms_name
mms_interval
replset
replset_config
replset_members
configsvr
shardsvr
rest
quiet
slowms
keyfile
key
set_parameter
syslog
config_content
config_template
config_data
tls
tls_key
tls_ca
tls_conn_without_cert
tls_invalid_hostnames
tls_invalid_certificates
tls_mode
admin_password_hash
restart
storage_engine
create_admin
admin_username
admin_password
admin_auth_mechanism
admin_update_password
admin_roles
handle_creds
store_creds
Data type: String[1]
Used to ensure that the package is installed and the service is running, or that the package is absent/purged and the service is stopped.
Default value: 'present'
Data type: String[1]
This setting can be used to override the default MongoDB user and owner of the service and related files in the file system. If not specified, the module will use the default for your OS distro.
Data type: String[1]
This setting can be used to override the default MongoDB user group to be used for related files in the file system. If not specified, the module will use the default for your OS distro.
Data type: Stdlib::Absolutepath
Path of the config file. If not specified, the module will use the default for your OS distro.
Default value: '/etc/mongod.conf'
Data type: Stdlib::Absolutepath
Set this value to designate a directory for the mongod instance to store it's data. If not specified, the module will use the default for your OS distro.
Data type: Boolean
Set this value to true if you want puppet to recursively manage the permissions of the files in the dbpath directory. If you are using the default dbpath, this should probably be false. Set this to true if you are using a custom dbpath.
Default value: false
Data type: String[4,4]
The file mode of the pidfilepath
Default value: '0644'
Data type: Optional[Stdlib::Absolutepath]
Specify a file location to hold the PID or process ID of the mongod process. If not specified, the module will use the default for your OS distro.
Default value: undef
Data type: Boolean
Should puppet create the pidfile. Mongod 6.2.10 will not start if pidfile exists
Default value: false
Data type: String
The path to the custom mongosh rc file.
Default value: "${facts['root_home']}/.mongoshrc.js"
Data type: Boolean
Whether or not the MongoDB service resource should be part of the catalog.
Default value: true
Whether or not the MongoDB sharding service resource should be part of the catalog.
Default value: true
Data type: String[1]
This setting can be used to override the default Mongos service name. If not specified, the module will use whatever service name is the default for your OS distro.
Default value: 'mongod'
Data type: Optional[String[1]]
This setting can be used to override the default Mongos service provider. If not specified, the module will use whatever service provider is the default for your OS distro.
Default value: undef
Data type: Optional[Enum['stopped', 'running']]
This setting can be used to override the default status check command for your Mongos service. If not specified, the module will use whatever service name is the default for your OS distro.
Default value: undef
Data type: Boolean
This setting can be used to specify if the service should be enable at boot.
Default value: true
Data type: Enum['stopped', 'running']
Default value: 'running'
Data type: String[1]
This setting can be used to specify if puppet should install the package or not.
Default value: pick($mongodb::globals::version, 'present')
Data type: String[1]
This setting can be used to specify the name of the package that should be installed. If not specified, the module will use whatever service name is the default for your OS distro.
Default value: "mongodb-${mongodb::globals::edition}-server"
Data type: Stdlib::Absolutepath
Specify the path to a file name for the log file that will hold all diagnostic logging information. Unless specified, mongod will output all log information to the standard output.
Default value: '/var/log/mongodb/mongod.log'
Data type: Array[Stdlib::IP::Address]
Set this option to configure the mongod or mongos process to bind to and listen for connections from applications on this address. If not specified, the module will use the default for your OS distro.
Default value: ['127.0.0.1']
Data type: Optional[Boolean]
This setting has to be true to configure MongoDB to turn on ipv6 support. If not specified and ipv6 address is passed to MongoDB bind_ip it will just fail.
Default value: undef
Data type: Boolean
Set to true to add new entries to the end of the logfile rather than overwriting the content of the log when the process restarts.
Default value: true
Data type: Optional[String]
Set to reopen for mongo to close a log file then reopen it so that logrotations handled outside of mongo perform as expected.
Default value: undef
Data type: Optional[Boolean]
Set to true to fork server process at launch time. The default setting depends on the operating system.
Default value: undef
Data type: Optional[Integer[1, 65535]]
Specifies a TCP port for the server instance to listen for client connections.
Default value: undef
Data type: Optional[Boolean]
Enable or disable the durability journal to ensure data files remain valid and recoverable. Available in MongoDB < 7.0 Default: true on 64-bit systems, false on 32-bit systems
Default value: undef
Data type: Optional[Boolean]
Set to true to modify MongoDB to use a smaller default data file size. Specifically, smallfiles reduces the initial size for data files and limits them to 512 megabytes.
Default value: undef
Data type: Optional[Boolean]
Set to true to force mongod to report every four seconds CPU utilization and the amount of time that the processor waits for I/O operations to complete (i.e. I/O wait.)
Default value: undef
Data type: Boolean
Set to true to enable database authentication for users connecting from remote hosts. If no users exist, the localhost interface will continue to have access to the database until you create the first user.
Default value: false
Data type: Optional[Boolean]
Increases the amount of internal reporting returned on standard output or in the log file generated by logpath.
Default value: undef
Data type: Optional[String]
MongoDB has the following levels of verbosity: v, vv, vvv, vvvv and vvvvv.
Default value: undef
Data type: Optional[Boolean]
Forces the mongod to validate all requests from clients upon receipt to ensure that clients never insert invalid documents into the database.
Default value: undef
Data type: Optional[Boolean]
Set to true to enable a maximum limit for the number of data files each database can have. The default quota is 8 data files, when quota is true.
Default value: undef
Data type: Optional[Integer]
Modify limit on the number of data files per database. This option requires the quota setting.
Default value: undef
Data type: Optional[Integer[0, 7]]
Creates a very verbose diagnostic log for troubleshooting and recording various errors. For more information please refer to MongoDB Configuration File Options.
Default value: undef
Data type: Optional[Boolean]
Set to true to modify the storage pattern of the data directory to store each database’s files in a distinct folder.
Default value: undef
Data type: Any
Modify this value to changes the level of database profiling, which inserts information about operation performance into output of mongod or the log file if specified by logpath.
Default value: undef
Data type: Optional[Integer]
Specifies a value to set the maximum number of simultaneous connections that MongoDB will accept. Unless set, MongoDB will not limit its own connections.
Default value: undef
Data type: Optional[Integer]
Specifies a maximum size in megabytes for the replication operation log (e.g. oplog.) mongod creates an oplog based on the maximum amount of space available. For 64-bit systems, the oplog is typically 5% of available disk space.
Default value: undef
Data type: Any
Ignore query hints.
Default value: undef
Data type: Optional[Boolean]
Set to true to disable the HTTP interface. This command will override the rest and disable the HTTP interface if you specify both.
Default value: undef
Data type: Optional[Boolean]
Set noscripting = true to disable the scripting engine.
Default value: undef
Data type: Optional[Boolean]
Set notablescan = true to forbid operations that require a table scan.
Default value: undef
Data type: Optional[Boolean]
Set noprealloc = true to disable the preallocation of data files. This will shorten the start up time in some cases, but can cause significant performance penalties during normal operations.
Default value: undef
Data type: Optional[Integer]
Use this setting to control the default size for all newly created namespace files (i.e .ns).
Default value: undef
Data type: Any
MMS token for mms monitoring.
Default value: undef
Data type: Any
MMS identifier for mms monitoring.
Default value: undef
Data type: Any
MMS interval for mms monitoring.
Default value: undef
Data type: Optional[String]
Use this setting to configure replication with replica sets. Specify a replica set name as an argument to this set. All hosts must have the same set name.
Default value: undef
Data type: Optional[Hash]
A hash that is used to configure the replica set. Mutually exclusive with replset_members param. class mongodb::server { replset => 'rsmain', replset_config => { 'rsmain' => { ensure => present, settings => { heartbeatTimeoutSecs => 15, getLastErrorModes => { ttmode => { dc => 1 } } }, members => [{'host' => 'host1:27017', 'tags':{ 'dc' : 'east'}}, { 'host' => 'host2:27017'}, 'host3:27017'] }}, }
Default value: undef
Data type: Optional[Array]
An array of member hosts for the replica set. Mutually exclusive with replset_config param.
Default value: undef
Data type: Optional[Boolean]
Use this setting to enable config server mode for mongod.
Default value: undef
Data type: Optional[Boolean]
Use this setting to enable shard server mode for mongod.
Default value: undef
Data type: Optional[Boolean]
Set to true to enable a simple REST interface.
Default value: undef
Data type: Optional[Boolean]
Runs the mongod or mongos instance in a quiet mode that attempts to limit the amount of output. This option suppresses : "output from database commands, including drop, dropIndexes, diagLogging, validate, and clean", "replication activity", "connection accepted events" and "connection closed events".
For production systems this option is not recommended as it may make tracking problems during particular connections much more difficult.
Default value: undef
Data type: Optional[Integer]
Sets the threshold for mongod to consider a query “slow” for the database profiler.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Specify the path to a key file to store authentication information. This option is only useful for the connection between replica set members.
Default value: undef
Data type: Optional[Variant[String[6], Sensitive[String[6]]]]
Specify the key contained within the keyfile. This option is only useful for the connection between replica set members.
Default value: undef
Data type: Optional[Variant[String[1], Array[String[1]], Hash]]
Set MongoDB parameters Supported types: String (i.e. 'textSearchEnabled=true' or 'textSearchEnabled: true' ) Array (i.e. ['textSearchEnabled=true'] or ['textSearchEnabled: true'] ) Hash (i.e. {'textSearchEnabled' => true}
Default value: undef
Data type: Boolean
Sends all logging output to the host’s syslog system rather than to standard output or a log file.
Default value: false
Data type: Any
Config content if the default doesn't match one needs.
Default value: undef
Data type: Optional[String]
Path to the config template if the default doesn't match one needs.
Default value: undef
Data type: Optional[Hash]
A hash to allow for additional configuration options to be set. (i.e {'security' => { 'javascriptEnabled' => false}})
Default value: undef
Data type: Boolean
Ensure tls is enabled.
Default value: false
Data type: Optional[Stdlib::Absolutepath]
Defines the path of the file that contains the TLS/SSL certificate and key.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Defines the path of the file that contains the certificate chain for verifying client certificates.
Default value: undef
Data type: Optional[Boolean]
Set to true to bypass client certificate validation for clients that do not present a certificate.
Default value: undef
Data type: Optional[Boolean]
Set to true to disable the validation of the hostnames in TLS certificates.
Default value: undef
Data type: Optional[Boolean]
Enable or disable the validation checks for TLS certificates on other servers in the cluster and allows the use of invalid certificates to connect.
Default value: undef
Data type: Enum['requireTLS', 'preferTLS', 'allowTLS']
Defines if TLS is used for all network connections. Allowed values are 'requireTLS', 'preferTLS' or 'allowTLS'.
Default value: 'requireTLS'
Data type: Optional[Variant[String[1], Sensitive[String[1]]]]
Hashed password. Hex encoded md5 hash of mongodb password.
Default value: undef
Data type: Boolean
Specifies whether the service should be restarted on config changes.
Default value: true
Data type: Optional[String]
Only needed for MongoDB 3.x versions, where it's possible to select the 'wiredTiger' engine in addition to the default 'mmapv1' engine. If not set, the config is left out and mongo will default to 'mmapv1'.
Default value: undef
Data type: Boolean
Allows to create admin user for admin database.
Default value: false
Data type: String
Administrator user name
Default value: 'admin'
Data type: Optional[Variant[String, Sensitive[String]]]
Administrator user password
Default value: undef
Data type: Enum['scram_sha_1', 'scram_sha_256']
Administrator authentication mechanism. scram_sha_256 password synchronization verification is not supported.
Default value: 'scram_sha_1'
Data type: Boolean
Update password. Used with SCRAM-SHA-256 because password verification is not supported.
Default value: false
Data type: Array[String[1]]
Administrator user roles
Default value:
[
'userAdmin', 'readWrite', 'dbAdmin', 'dbAdminAnyDatabase', 'readAnyDatabase',
'readWriteAnyDatabase', 'userAdminAnyDatabase', 'clusterAdmin',
'clusterManager', 'clusterMonitor', 'hostManager', 'root', 'restore',
]
Data type: Boolean
Set this to false to avoid having puppet handle .mongoshrc.js in case you wish to deliver it by other means. This is needed for facts and providers to work if you have auth set to true.
Default value: true
Data type: Boolean
Store admin credentials in mongoshrc.js file. Uses with create_admin parameter
Default value: false
Wrapper class useful for hiera based deployments
mongodb::shardsvr::shards:
shard01:
keys:
- {x: 1}
members:
- shardhost01.exmaple.com:30000
- shardhost02.exmaple.com:30000
- shardhost03.exmaple.com:30000
The following parameters are available in the mongodb::shardsvr
class:
Data type: Any
Hash of attributes as described in the mongodb_shardsvr custom type
Default value: undef
Class for creating mongodb databases and users.
The following parameters are available in the mongodb::db
defined type:
Data type: String
Database username.
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'
Data type: String
Database name. Defaults to $name.
Default value: $name
Data type: Optional[Variant[String[1], Sensitive[String[1]]]]
Hashed password. Hex encoded md5 hash of "$username:mongo:$password".
Default value: undef
Data type: Optional[Variant[String[1], Sensitive[String[1]]]]
Plain text user password. This is UNSAFE, use 'password_hash' instead.
Default value: undef
Data type: Array[String]
Array with user roles. Deaults to ['dbAdmin']
Default value: ['dbAdmin']
Data type: Integer[0]
The maximum amount of two second tries to wait MongoDB startup. Defaults to 10.
Default value: 10
Data type: Boolean
Force an update of the password when scram_sha_256 is used. Defaults to false.
Default value: false
Verify that a connection can be successfully established between a node and the mongodb server. Its primary use is as a precondition to prevent configuration changes from being applied if the mongodb server cannot be reached, but it could potentially be used for other purposes such as monitoring.
The following properties are available in the mongodb_conn_validator
type.
Valid values: present
, absent
Ensure to verify the connection to mongodb
Default value: present
The following parameters are available in the mongodb_conn_validator
type.
namevar
An arbitrary name used as the identity of the resource. It can also be the connection string to test (ie. 127.0.0.1:27017)
The port that the mongodb server should be listening on.
Default value: 27017
The specific backend to use for this mongodb_conn_validator
resource. You will seldom need to specify this --- Puppet
will usually discover the appropriate provider for your platform.
An array containing DNS names or IP addresses of the server where mongodb should be running.
Default value: 127.0.0.1
The max number of seconds that the validator should wait before giving up and deciding that puppetdb is not running; defaults to 60 seconds.
Default value: 60
Manage MongoDB databases.
The following properties are available in the mongodb_database
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the mongodb_database
type.
Valid values: %r{^[\w-]+$}
namevar
The name of the database.
The specific backend to use for this mongodb_database
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
Valid values: %r{^\d+$}
The maximum amount of two second tries to wait MongoDB startup.
Default value: 10
Manage a MongoDB replicaSet
The following properties are available in the mongodb_replset
type.
Valid values: present
Ensure the replicaset is either present or absent
Default value: present
The replicaSet members config
The replicaSet settings config
The following parameters are available in the mongodb_replset
type.
The replicaSet arbiter
Host to use for Replicaset initialization
Default value: 127.0.0.1
namevar
The name of the replicaSet
The specific backend to use for this mongodb_replset
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
Manage a MongoDB Shard
The following properties are available in the mongodb_shard
type.
Valid values: present
Ensure the shard is either present or absent
Default value: present
The sharding keys
The shard member
The following parameters are available in the mongodb_shard
type.
namevar
The name of the shard
The specific backend to use for this mongodb_shard
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
Manage a MongoDB user. This includes management of users password as well as privileges.
The following properties are available in the mongodb_user
type.
Valid values: %r{^[\w-]+$}
The user's target database.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The plaintext password of the user.
Valid values: %r{^\w+$}
The password hash of the user. Use mongodb_password() for creating hash. Only available on MongoDB 3.0 and later. SCRAM-SHA-256 authentication mechanism is not supported.
Valid values: %r{^\w+(@\w+)?$}
The user's roles.
Default value: ['dbAdmin']
The SCRAM-SHA-1 credentials of a user. These are read only and change when password or password_hash changes.
The name of the user.
The following parameters are available in the mongodb_user
type.
Valid values: scram_sha_256
, scram_sha_1
Authentication mechanism. Password verification is not supported with SCRAM-SHA-256.
Default value: scram_sha_1
namevar
The name of the resource.
The specific backend to use for this mongodb_user
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
Valid values: %r{^\d+$}
The maximum amount of two second tries to wait MongoDB startup.
Default value: 10
Update password. Used with SCRAM-SHA-256 because password verification is not supported.
Default value: false
Type: Ruby 4.x API
Get the mongodb password hash from the clear text password.
mongodb_password(String[1] $username, Variant[String[1], Sensitive[String[1]]] $password, Optional[Boolean] $sensitive)
Get the mongodb password hash from the clear text password.
Returns: Variant[String, Sensitive[String]]
Data type: String[1]
Data type: Variant[String[1], Sensitive[String[1]]]
Data type: Optional[Boolean]