Debian Codegraph @

ansible_collections/community/mongodb/roles/mongodb_mongos/README.md

raw
1 mongodb_mongos
2 ==============
3
4 A role to setup a mongos server for a MongoDB sharded cluster.
5
6 Requirements
7 ------------
8
9 Any pre-requisites that may not be covered by Ansible itself or the role should
10 be mentioned here. For instance, if the role uses the EC2 module, it may be a
11 good idea to mention in this section that the boto package is required.
12
13 Role Variables
14 --------------
15
16 * `mongos_port`: The port used by the mongos process. Default `27017`.
17 * `mongos_service`: The name of the mongos service. Default `mongos`.
18 * `mongodb_user`: The Linux OS user for MongoDB. Default `mongod`.
19 * `mongodb_group`: The Linux OS user group for MongoDB. Default `mongod`.
20 * `pid_file`: The pid file for mongos. Default `/run/mongodb/mongos.pid`.
21 * `bind_ip`: The IP address mongos will bind to. Default `0.0.0.0`.
22 * `bind_ip_all`: Have mongos bind to all IP addresses instead of specifying `bind_ip`. Default `false`.
23 * `log_path`: Path of the log file. Default: `/var/log/mongodb/mongos.log`.
24 * `mypy`: Python interpretor. Default `python`.
25 * `mongos_package`: The name of the mongos installation package. Default `mongodb-org-mongos`.
26 * `config_repl_set_name`: The name of the config server replicaset. Default `cfg`.
27 * `config_servers`: "config1:27019, config2:27019, config3:27019"
28 * `openssl_keyfile_content`: The kexfile content that MongoDB uses to authenticate within a replicaset. Generate with cmd: openssl rand -base64 756.
29 * `openssl_keyfile_path`: Put the openssl_keyfile at this path. Default: `/etc/keyfile`.
30 * `net_compressors`: If this is set, this sets `net.compression.compressors` in mongos.conf.
31 * `mongos_config_template`: If defined allows to override path to mongod config template with custom configuration. Default `mongos.conf.j2`.
32 * `skip_restart`: If set to `true` will skip restarting mongos service when config file or the keyfile content changes. Default `true`.
33 * `mongodb_use_tls`: Whether to use tls. Default `false`.
34 * `mongodb_disabled_tls_protocols`: The tls protocols to be disabled. Leave blank to let MongoDB decide which protocols to allow according to the ones available on the system; check the [official docs](https://www.mongodb.com/docs/v6.0/reference/configuration-options/#mongodb-setting-net.tls.disabledProtocols) for details. Default "".
35 * `mongodb_allow_connections_without_certificates`: When enabled allows to bypass the certificate validation for clients that do not present a certificate, if a certificate is provided it _must_ be valid. Default `false`.
36 * `mongodb_certificate_key_file`: Path to the PEM-file containing the certficate and private key.
37 * `mongodb_certificate_ca_file`: Path to the CA-file.
38
39 Dependencies
40 ------------
41
42 mongodb_repository
43
44 Example Playbook
45 ----------------
46
47 ```yaml
48 - hosts: servers
49 roles:
50 - mongodb_repository
51 - mongodb_mongos
52 ```
53
54 License
55 -------
56
57 BSD
58
59 Author Information
60 ------------------
61
62 Rhys Campbell (https://github.com/rhysmeister)