mongodb::client: Class for installing a MongoDB client shell (CLI). == Parameters $ensure:: Desired ensure state of the package. $package_name:: Name of thmongodb::globals: Class for setting cross-class global overrides. See README.md for more details.mongodb::mongos: This installs a Mongo Shard daemon. See README.md for more details.mongodb::mongos::config: PRIVATE CLASS: do not call directlymongodb::mongos::install: PRIVATE CLASS: do not call directlymongodb::mongos::params: PRIVATE CLASS: do not use directlymongodb::mongos::service: PRIVATE CLASS: do not call directlymongodb::opsmanager: This installs Ops Managermongodb::params: PRIVATE CLASS: do not use directlymongodb::replset: Wrapper class useful for hiera based deploymentsmongodb::repo: PRIVATE CLASS: do not use directlymongodb::repo::apt: PRIVATE CLASS: do not use directlymongodb::repo::yum: PRIVATE CLASS: do not use directlymongodb::server: This installs a MongoDB server. See README.md for more details.mongodb::server::config: PRIVATE CLASS: do not call directlymongodb::server::install: PRIVATE CLASS: do not call directlymongodb::server::service: PRIVATE CLASS: do not call directlymongodb::shardsvr: Wrapper class useful for hiera based deployments
mongodb::client::paramsmongodb::repo::zypper: This is a repo class for zypper
mongodb::db: == Class: mongodb::db Class for creating mongodb databases and users. == Parameters user - Database username. auth_mechanism - Authentic
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.
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.
The following parameters are available in the mongodb::client class:
Data type: String[1]
Default value: $mongodb::client::params::package_ensure
Data type: String[1]
Default value: $mongodb::client::params::package_name
Class for setting cross-class global overrides. See README.md for more details.
The following parameters are available in the mongodb::globals class:
server_package_nameclient_package_namemongod_service_manageservice_enableservice_ensureservice_nameservice_providerservice_statususergroupipv6bind_ipversionmanage_package_repomanage_packagerepo_proxyproxy_usernameproxy_passwordrepo_locationuse_enterprise_repopidfilepathpidfilemodemanage_pidfile
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value:
fact('os.distro.codename') ? { # Debian 10 doesn't provide mongodb 3.6.
'buster' => '4.4.8',
default => undefData type: Any
Default value:
fact('os.distro.codename') ? { # Debian 10 doesn't provide mongodb packages. So manage it!
'buster' => true,
default => undefData type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
This installs a Mongo Shard daemon. See README.md for more details.
The following parameters are available in the mongodb::mongos class:
configconfig_contentconfig_templateconfigdbconfig_dataservice_manageservice_providerservice_nameservice_templateservice_enableservice_ensureservice_statuspackage_ensurepackage_nameunixsocketprefixpidfilepathlogpathforkbind_ipportrestart
Data type: Stdlib::Absolutepath
Default value: $mongodb::mongos::params::config
Data type: Optional[String[1]]
Default value: $mongodb::mongos::params::config_content
Data type: Optional[String[1]]
Default value: $mongodb::mongos::params::config_template
Data type: Variant[String[1], Array[String[1]]]
Default value: $mongodb::mongos::params::configdb
Data type: Optional[Hash]
Default value: $mongodb::mongos::params::config_data
Data type: Boolean
Default value: $mongodb::mongos::params::service_manage
Data type: Optional[String]
Default value: $mongodb::mongos::params::service_provider
Data type: Optional[String]
Default value: $mongodb::mongos::params::service_name
Data type: Optional[String[1]]
Default value: $mongodb::mongos::params::service_template
Data type: Boolean
Default value: $mongodb::mongos::params::service_enable
Data type: Stdlib::Ensure::Service
Default value: $mongodb::mongos::params::service_ensure
Data type: Optional[String]
Default value: $mongodb::mongos::params::service_status
Data type: Variant[Boolean, String]
Default value: $mongodb::mongos::params::package_ensure
Data type: String
Default value: $mongodb::mongos::params::package_name
Data type: Optional[Stdlib::Absolutepath]
Default value: $mongodb::mongos::params::unixsocketprefix
Data type: Optional[Stdlib::Absolutepath]
Default value: $mongodb::mongos::params::pidfilepath
Data type: Optional[Variant[Boolean, Stdlib::Absolutepath]]
Default value: $mongodb::mongos::params::logpath
Data type: Optional[Boolean]
Default value: $mongodb::mongos::params::fork
Data type: Optional[Array[Stdlib::IP::Address]]
Default value: $mongodb::mongos::params::bind_ip
Data type: Optional[Stdlib::Port]
Default value: $mongodb::mongos::params::port
Data type: Boolean
Default value: $mongodb::mongos::params::restart
PRIVATE CLASS: do not call directly
The following parameters are available in the mongodb::mongos::config class:
package_ensureconfigconfig_contentconfig_templateservice_manageconfigdbbind_ipportforkpidfilepathlogpathunixsocketprefixconfig_data
Data type: Any
Default value: $mongodb::mongos::package_ensure
Data type: Any
Default value: $mongodb::mongos::config
Data type: Any
Default value: $mongodb::mongos::config_content
Data type: Any
Default value: $mongodb::mongos::config_template
Data type: Any
Default value: $mongodb::mongos::service_manage
Data type: Any
Default value: $mongodb::mongos::configdb
Data type: Any
Default value: $mongodb::mongos::bind_ip
Data type: Any
Default value: $mongodb::mongos::port
Data type: Any
Default value: $mongodb::mongos::fork
Data type: Any
Default value: $mongodb::mongos::pidfilepath
Data type: Any
Default value: $mongodb::mongos::logpath
Data type: Any
Default value: $mongodb::mongos::unixsocketprefix
Data type: Any
Default value: $mongodb::mongos::config_data
PRIVATE CLASS: do not call directly
The following parameters are available in the mongodb::mongos::install class:
Data type: Any
Default value: $mongodb::mongos::package_ensure
Data type: Any
Default value: $mongodb::mongos::package_name
PRIVATE CLASS: do not use directly
PRIVATE CLASS: do not call directly
The following parameters are available in the mongodb::mongos::service class:
package_ensureservice_manageservice_nameservice_enableservice_ensureservice_statusservice_providerbind_ipportservice_template
Data type: Any
Default value: $mongodb::mongos::package_ensure
Data type: Any
Default value: $mongodb::mongos::service_manage
Data type: Any
Default value: $mongodb::mongos::service_name
Data type: Any
Default value: $mongodb::mongos::service_enable
Data type: Any
Default value: $mongodb::mongos::service_ensure
Data type: Any
Default value: $mongodb::mongos::service_status
Data type: Any
Default value: $mongodb::mongos::service_provider
Data type: Any
Default value: $mongodb::mongos::bind_ip
Data type: Any
Default value: $mongodb::mongos::port
Data type: Any
Default value: $mongodb::mongos::service_template
This installs Ops Manager
The following parameters are available in the mongodb::opsmanager class:
usergroupopsmanager_urlopsmanager_mongo_urica_filepem_key_filepem_key_passwordensurepackage_namepackage_ensureservice_enableservice_manageservice_namedownload_urlmongo_uriclient_certificate_modefrom_email_addrreply_to_email_addradmin_email_addremail_dao_classmail_transportsmtp_server_hostnamesmtp_server_portsslignore_ui_setupuser_svc_classsnapshot_intervalsnapshot_interval_retentionsnapshot_daily_retentionsnapshot_weekly_retentionsnapshot_monthly_retentionversions_directory
Data type: String[1]
The user that owns the config file
Default value: 'mongodb-mms'
Data type: String[1]
The group that owns the config file
Default value: 'mongodb-mms'
Data type: Stdlib::Httpurl
The fully qualified url where opsmanager runs. Must include the port.
Default value: "http://${facts['networking']['fqdn']}:8080"
Full URI where the Ops Manager application mongodb server(s) can be found.
Data type: Optional[String[1]]
Ca file for secure connection to backup agents.
Default value: undef
Data type: Optional[String[1]]
Pem key file containing the cert and private key used for secure connections to backup agents.
Default value: undef
Data type: Optional[String[1]]
The password to the pem key file.
Default value: undef
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: String[1]
Default value: 'None'
Data type: String[1]
Default value: 'from@example.com'
Data type: String[1]
Default value: 'reply-to@example.com'
Data type: String[1]
Default value: 'admin@example.com'
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[Integer]
Default value: undef
Data type: Optional[Integer]
Default value: undef
Data type: Optional[Integer]
Default value: undef
Data type: Optional[Integer]
Default value: undef
Data type: Optional[Integer]
Default value: undef
Data type: Optional[Integer]
Default value: undef
PRIVATE CLASS: do not use directly
Wrapper class useful for hiera based deployments
The following parameters are available in the mongodb::replset class:
Data type: Any
Default value: undef
PRIVATE CLASS: do not use directly
The following parameters are available in the mongodb::repo class:
Data type: Variant[Enum['present', 'absent'], Boolean]
Default value: 'present'
Data type: Optional[String]
Default value: undef
Data type: Boolean
Default value: false
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
PRIVATE CLASS: do not use directly
PRIVATE CLASS: do not use directly
This installs a MongoDB server. See README.md for more details.
The following parameters are available in the mongodb::server class:
tlstls_keytls_catls_conn_without_certtls_invalid_hostnamestls_modeensureusergroupconfigdbpathdbpath_fixpidfilepathpidfilemodemanage_pidfilercfileservice_manageservice_providerservice_nameservice_enableservice_ensureservice_statuspackage_ensurepackage_namemongosh_package_namelogpathbind_ipipv6logappendsystem_logrotateforkportjournalnojournalsmallfilescpuauthnoauthverboseverbositylevelobjcheckquotaquotafilesdiaglogdirectoryperdbprofilemaxconnsoplog_sizenohintsnohttpinterfacenoscriptingnotablescannopreallocnssizemms_tokenmms_namemms_intervalreplsetreplset_configreplset_membersconfigsvrshardsvrrestquietslowmskeyfilekeyset_parametersyslogconfig_contentconfig_templateconfig_datasslssl_keyssl_cassl_weak_certssl_invalid_hostnamesssl_moderestartstorage_enginecreate_adminadmin_usernameadmin_passwordadmin_auth_mechanismadmin_update_passwordhandle_credsstore_credsadmin_roles
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: Boolean
Set to true to bypass client certificate validation for clients that do not present a certificate.
Default value: false
Data type: Boolean
Set to true to disable the validation of the hostnames in TLS certificates.
Default value: false
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: Variant[Boolean, String]
Default value: $mongodb::params::ensure
Data type: String
Default value: $mongodb::params::user
Data type: String
Default value: $mongodb::params::group
Data type: Stdlib::Absolutepath
Default value: $mongodb::params::config
Data type: Stdlib::Absolutepath
Default value: $mongodb::params::dbpath
Data type: Boolean
Default value: $mongodb::params::dbpath_fix
Data type: Optional[Stdlib::Absolutepath]
Default value: $mongodb::params::pidfilepath
Data type: String
Default value: $mongodb::params::pidfilemode
Data type: Boolean
Default value: $mongodb::params::manage_pidfile
Data type: String
Default value: $mongodb::params::rcfile
Data type: Boolean
Default value: $mongodb::params::service_manage
Data type: Optional[String]
Default value: $mongodb::params::service_provider
Data type: Optional[String]
Default value: $mongodb::params::service_name
Data type: Boolean
Default value: $mongodb::params::service_enable
Data type: Enum['stopped', 'running']
Default value: $mongodb::params::service_ensure
Data type: Optional[Enum['stopped', 'running']]
Default value: $mongodb::params::service_status
Data type: Variant[Boolean, String]
Default value: $mongodb::params::package_ensure
Data type: String
Default value: $mongodb::params::server_package_name
Data type: String
Default value: $mongodb::params::mongosh_package_name
Data type: Variant[Boolean, Stdlib::Absolutepath]
Default value: $mongodb::params::logpath
Data type: Array[Stdlib::IP::Address]
Default value: $mongodb::params::bind_ip
Data type: Optional[Boolean]
Default value: undef
Data type: Boolean
Default value: true
Data type: Optional[String]
Default value: undef
Data type: Optional[Boolean]
Default value: $mongodb::params::fork
Data type: Optional[Integer[1, 65535]]
Default value: undef
Data type: Optional[Boolean]
Default value: $mongodb::params::journal
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Boolean
Default value: false
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Integer]
Default value: undef
Data type: Optional[Integer[0, 7]]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Any
Default value: undef
Data type: Optional[Integer]
Default value: undef
Data type: Optional[Integer]
Default value: undef
Data type: Any
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Integer]
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[Hash]
Default value: undef
Data type: Optional[Array]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Integer]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Optional[Variant[String[6], Sensitive[String[6]]]]
Default value: undef
Data type: Optional[Variant[String[1], Array[String[1]]]]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Any
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[Hash]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Boolean
Default value: false
Data type: Boolean
Default value: false
Data type: Enum['requireSSL', 'preferSSL', 'allowSSL']
Default value: 'requireSSL'
Data type: Boolean
Default value: $mongodb::params::restart
Data type: Optional[String]
Default value: undef
Data type: Boolean
Default value: $mongodb::params::create_admin
Data type: String
Default value: $mongodb::params::admin_username
Data type: Optional[Variant[String, Sensitive[String]]]
Default value: undef
Data type: Enum['scram_sha_1', 'scram_sha_256']
Default value: $mongodb::params::admin_auth_mechanism
Data type: Boolean
Default value: false
Data type: Boolean
Default value: $mongodb::params::handle_creds
Data type: Boolean
Default value: $mongodb::params::store_creds
Data type: Array
Default value: $mongodb::params::admin_roles
PRIVATE CLASS: do not call directly
PRIVATE CLASS: do not call directly
PRIVATE CLASS: do not call directly
Wrapper class useful for hiera based deployments
The following parameters are available in the mongodb::shardsvr class:
Data type: Any
Default value: undef
== 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.
The following parameters are available in the mongodb::db defined type:
Data type: String
Data type: Enum['scram_sha_1', 'scram_sha_256']
Default value: 'scram_sha_1'
Data type: String
Default value: $name
Data type: Optional[Variant[String[1], Sensitive[String[1]]]]
Default value: undef
Data type: Optional[Variant[String[1], Sensitive[String[1]]]]
Default value: undef
Data type: Array[String]
Default value: ['dbAdmin']
Data type: Integer[0]
Default value: 10
Data type: Boolean
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
The basic property that the resource should be in.
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
The basic property that the resource should be in.
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
The basic property that the resource should be in.
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]