File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ mongodb_pymongo_pip_version: 3.7.1
16
16
mongodb_user_update_password : " on_create" # MongoDB user password update default policy
17
17
mongodb_manage_service : true
18
18
mongodb_manage_systemd_unit : true
19
+ mongodb_systemd_unit_limit_nofile : 64000
20
+ mongodb_systemd_unit_limit_nproc : 64000
19
21
20
22
mongodb_disable_transparent_hugepages : false
21
23
Original file line number Diff line number Diff line change 59
59
state : present
60
60
61
61
- name : Add systemd configuration if present
62
- copy :
63
- src : mongodb.service
62
+ template :
63
+ src : mongodb.service.j2
64
64
dest : " /lib/systemd/system/{{mongodb_daemon_name}}.service"
65
65
owner : root
66
66
group : root
Original file line number Diff line number Diff line change
1
+ # {{ ansible_managed }}
1
2
[Unit]
2
3
Description=An object/document-oriented database
3
4
Documentation=man:mongod(1)
4
5
5
6
[Service]
6
- User =mongodb
7
+ User={{ mongodb_user }}
7
8
ExecStart=/usr/bin/numactl --interleave=all /usr/bin/mongod --config /etc/mongod.conf
8
9
# file size
9
10
LimitFSIZE=infinity
@@ -12,9 +13,9 @@ LimitCPU=infinity
12
13
# virtual memory size
13
14
LimitAS=infinity
14
15
# open files
15
- LimitNOFILE =64000
16
+ LimitNOFILE={{ mongodb_systemd_unit_limit_nofile }}
16
17
# processes/threads
17
- LimitNPROC =64000
18
+ LimitNPROC={{ mongodb_systemd_unit_limit_nproc }}
18
19
# locked memory
19
20
LimitMEMLOCK=infinity
20
21
# total threads (user+kernel)
You can’t perform that action at this time.
0 commit comments