kowabunga.cloud.mongodb role – Install, configure, and start local MongoDB cluster.

Note

This role is part of the kowabunga.cloud collection (version 0.0.1).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: ansible-galaxy collection install kowabunga.cloud.

To use it in a playbook, specify: kowabunga.cloud.mongodb.

Entry point main – Install, configure, and start local MongoDB cluster.

Synopsis

  • Install, configure, and start local MongoDB cluster.

Parameters

Parameter

Comments

kowabunga_mongodb_admin_password

string / required

Password for MongoDB admin user.

Suggested to be store securely into a vaulted variable.

kowabunga_mongodb_admin_username

string

Name of the MongoDB admin user

Default: "admin"

kowabunga_mongodb_backup_dir

string

Location on local machine to dump MongoDB database backup.

Default: "/opt/mongodb"

kowabunga_mongodb_backup_enabled

boolean

Defines whether daily backups of MongoDB database must be performed.

Backups occur daily at 5am local time.

Enabled if unspecified.

Choices:

  • false

  • true ← (default)

kowabunga_mongodb_enabled

boolean

Defines whether a local MongoDB cluster should be deployed.

Useless if you already have a remote MongoDB cluster.

Disabled if unspecified.

Choices:

  • false ← (default)

  • true

kowabunga_mongodb_listen_addr

string

Local IP addresses for MongoDB server to bind to.

Private network address is required if you intend to setup a cluster (i.e. non standalone instance).

Comma-separated list of IP addresses.

Default: "127.0.0.1,{{ lan_ip if lan_ip != '' else wan_ip }}"

kowabunga_mongodb_rs_enabled

boolean

Defines whether to enable support for MongoDB replicaset.

Required for clustering.

Harmless on a standalone instance (allows for future scale up).

Choices:

  • false

  • true ← (default)

kowabunga_mongodb_rs_key

string / required

Replicaset clustering authentication key.

Free string, as much complex as expected.

Requires by cluster peers to interconnect.

kowabunga_mongodb_rs_name

string / required

Replicaset cluster name

Free string.

kowabunga_mongodb_users

list / elements=dictionary

List of local MongoDB users to be created.

Default: []

base

string / required

MongoDB database name the user manages.

password

string / required

MongoDB user password.

Suggested to be store securely into a vaulted variable.

readWrite

boolean

Defines whether the user has read-only or read-write privilege on the selected database.

Choices:

  • false

  • true ← (default)

username

string / required

MongoDB user name.