Ansible role that installs and configures mongodb
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Andrea Dell'Amico 1fa3343662
Remove the task that stops the exporter.
3 months ago
defaults New parameters. 4 months ago
handlers Manage the prometheus exporter. 4 months ago
meta First commit. 7 months ago
tasks Remove the task that stops the exporter. 3 months ago
templates set MajorityReadConcern to false to mongodb 3.6 3 months ago
tests Initial commit 7 months ago
vars First commit. 7 months ago
.gitignore Initial commit 7 months ago
LICENSE Initial commit 7 months ago First commit. 7 months 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,