Skip to content

Commit 4c3919d

Browse files
author
Sergei Antipov
committed
Changes in variables definition
1 parent 30c2bc3 commit 4c3919d

File tree

2 files changed

+26
-24
lines changed

2 files changed

+26
-24
lines changed

defaults/main.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,25 @@ mongodb_additional_packages:
88
mongodb_user: mongodb
99
mongodb_daemon_name: "{{ 'mongod' if ('mongodb-org' in mongodb_package) else 'mongodb' }}"
1010

11-
mongodb_conf_auth: "no" # Run with security
11+
mongodb_conf_auth: false # Run with security
1212
mongodb_conf_bind_ip: 127.0.0.1 # Comma separated list of ip addresses to listen on
13-
mongodb_conf_cpu: "yes" # Periodically show cpu and iowait utilization
13+
mongodb_conf_cpu: true # Periodically show cpu and iowait utilization
1414
mongodb_conf_dbpath: /data/db # Directory for datafiles
15-
mongodb_conf_fork: "no" # Fork server process
16-
mongodb_conf_httpinterface: "no" # Enable http interface
17-
mongodb_conf_ipv6: "no" # Enable IPv6 support (disabled by default)
18-
mongodb_conf_journal: "no" # Enable journaling
19-
mongodb_conf_logappend: "yes" # Append to logpath instead of over-writing
15+
mongodb_conf_fork: false # Fork server process
16+
mongodb_conf_httpinterface: false # Enable http interface
17+
mongodb_conf_ipv6: false # Enable IPv6 support (disabled by default)
18+
mongodb_conf_journal: true # Enable journaling
19+
mongodb_conf_logappend: true # Append to logpath instead of over-writing
2020
mongodb_conf_logpath: /var/log/mongodb/{{ mongodb_daemon_name }}.log # Log file to send write to instead of stdout
2121
mongodb_conf_maxConns: 1000000 # Max number of simultaneous connections
22-
mongodb_conf_noprealloc: "no" # Disable data file preallocation
23-
mongodb_conf_noscripting: "no" # Disable scripting engine
24-
mongodb_conf_notablescan: "no" # Do not allow table scans
22+
mongodb_conf_noprealloc: false # Disable data file preallocation
23+
mongodb_conf_smallfiles: false # Disable smallfiles option
24+
mongodb_conf_noscripting: false # Disable scripting engine
25+
mongodb_conf_notablescan: false # Do not allow table scans
2526
mongodb_conf_port: 27017 # Specify port number
26-
mongodb_conf_quota: "no" # Limits each database to a certain number of files
27+
mongodb_conf_quota: false # Limits each database to a certain number of files
2728
mongodb_conf_quotaFiles: 8 # Number of quota files
28-
mongodb_conf_syslog: "no" # Log to system's syslog facility instead of file
29+
mongodb_conf_syslog: false # Log to system's syslog facility instead of file
2930

3031
# Replica set options:
3132
mongodb_conf_replSet: # Enable replication <setname>[/<optionalseedhostlist>]

templates/mongod.conf.j2

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
# {{ ansible_managed }}
22

3-
auth = {{ mongodb_conf_auth }}
3+
auth = {{ mongodb_conf_auth|to_nice_json }}
44
bind_ip = {{ mongodb_conf_bind_ip }}
5-
cpu = {{ mongodb_conf_cpu }}
5+
cpu = {{ mongodb_conf_cpu|to_nice_json }}
66
dbpath = {{ mongodb_conf_dbpath }}
7-
fork = {{ mongodb_conf_fork }}
8-
httpinterface = {{ mongodb_conf_httpinterface }}
9-
ipv6 = {{ mongodb_conf_ipv6 }}
10-
journal = {{ mongodb_conf_journal }}
11-
logappend = {{ mongodb_conf_logappend }}
7+
fork = {{ mongodb_conf_fork|to_nice_json }}
8+
httpinterface = {{ mongodb_conf_httpinterface|to_nice_json }}
9+
ipv6 = {{ mongodb_conf_ipv6|to_nice_json }}
10+
journal = {{ mongodb_conf_journal|to_nice_json }}
11+
logappend = {{ mongodb_conf_logappend|to_nice_json }}
1212
logpath = {{ mongodb_conf_logpath }}
1313
maxConns = {{ mongodb_conf_maxConns }}
14-
noprealloc = {{ mongodb_conf_noprealloc }}
15-
noscripting = {{ mongodb_conf_noscripting }}
16-
notablescan = {{ mongodb_conf_notablescan }}
14+
noprealloc = {{ mongodb_conf_noprealloc|to_nice_json }}
15+
noscripting = {{ mongodb_conf_noscripting|to_nice_json }}
16+
notablescan = {{ mongodb_conf_notablescan|to_nice_json }}
1717
port = {{ mongodb_conf_port }}
18-
quota = {{ mongodb_conf_quota }}
18+
quota = {{ mongodb_conf_quota|to_nice_json }}
1919
quotaFiles = {{ mongodb_conf_quotaFiles }}
20-
syslog = {{ mongodb_conf_syslog }}
20+
syslog = {{ mongodb_conf_syslog|to_nice_json }}
21+
smallfiles = {{ mongodb_conf_smallfiles|to_nice_json }}
2122

2223
{% if mongodb_conf_replSet %}
2324
# Replica set options:

0 commit comments

Comments
 (0)