Ansible role that installs and configures mongodb
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Andrea Dell'Amico 9277576d8b
Undefine mongodb_allowed_hosts
3 days ago
defaults Undefine mongodb_allowed_hosts 3 days ago
handlers Manage the prometheus exporter. 2 years ago
meta First commit. 2 years ago
tasks Remove the task that stops the exporter. 2 years ago
templates mongodb oplog property parameterized in conf 3.6 3 days ago
tests Initial commit 2 years ago
vars First commit. 2 years ago
.gitignore Initial commit 2 years ago
LICENSE Initial commit 2 years ago First commit. 2 years ago

Role Name

A role that installs MongoDB

Role Variables

The most important variables are listed below:

mongodb_install_from_external_repo: False
  - 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
  - EA312927
  - 0C49F3730359A14518585931BC711F9BA15703C6
mongodb_apt_repository: "deb {{ ansible_distribution_release }}/mongodb-org/{{ mongodb_version }} multiverse"

  - "deb {{ ansible_distribution_release }}/mongodb-org/3.0 multiverse"
  - "deb dist 10gen"

mongodb_install_packages: True
mongodb_install_server: True
mongodb_install_conf: True
mongodb_upgrade_from_older_version: False
mongodb_version: 3.6
# Set to 'latest' if you want to get the latest available package
mongodb_pkg_state: present
  - mongodb-org
  - mongodb-org-mongos
  - mongodb-org-server
  - mongodb-org-shell
  - mongodb-org-tools

  - mongodb-org-shell

  - mongodb
  - mongodb-server
  - mongo-tools

  - mongodb-clients

mongodb_start_server: 'yes'
mongodb_tcp_port: 27017
mongodb_http_interface: 'false'
mongodb_user: mongodb
mongodb_group: mongodb
mongodb_logdir: /var/log/mongodb
mongodb_log_file: mongod.log
mongodb_logpath: '{{ mongodb_logdir }}/{{ mongodb_log_file }}'
mongodb_dbpath: /var/lib/mongodb
mongodb_directoryperdb: 'false'
mongodb_conf_file: /etc/mongod.conf
mongodb_daemon: /usr/bin/mongod
mongod_additional_options: ""
  - '{{ ansible_default_ipv4.address }}/32'

mongodb_storage_engine: wiredTiger

mongodb_ssl_enabled: True
mongodb_ssl_letsencrypt_managed: True
mongodb_ssl_letsencrypt_ca_dir: '/etc/ssl/certs'
# Default CA file on Ubuntu
mongodb_ssl_letsencrypt_ca_filename: 'ca-certificates.crt'
# Options: disabled, requireSSL, allowSSL, preferSSL
mongodb_ssl_mode: requireSSL
mongodb_ssl_cert_dir: /etc/pki/mongodb
mongodb_ssl_certkey_file: '{{ mongodb_ssl_cert_dir }}/mongodb.pem'
mongodb_ssl_CA_file: '{{ mongodb_ssl_letsencrypt_ca_dir }}/{{ mongodb_ssl_letsencrypt_ca_filename }}'
mongodb_ssl_allowConnectionsWithoutCertificates: 'true'
mongodb_ssl_disabled_protocols: 'TLS1_0,TLS1_1'

# Do not change the default. We do not manage a logrotate configuration yet
mongodb_logrotate_management: True
mongodb_systemlog_external_logrotate: False
mongodb_systemlog_destination: file
mongodb_log_retain_days: 7
# Not used anymore inside the template. Now we use different values based on mongodb_systemlog_external_logrotate
mongodb_systemlog_logappend: 'true'
mongodb_systemlog_logrotate: reopen

mongodb_cluster_enabled: False
mongodb_authorization_enabled: False
mongodb_replicaset: storagedev
mongodb_replica_keyfile: '{{ mongodb_dbpath }}/replica_keyfile'

# User and password are stored in the variables mongo_monitoring_u and mongo_monitoring_pwd





Author Information

Andrea Dell'Amico,