File tree Expand file tree Collapse file tree 5 files changed +4
-77
lines changed Expand file tree Collapse file tree 5 files changed +4
-77
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,9 @@ mongodb_package: mongodb-org
19
19
# I will recommend you to use latest version of MongoDB.
20
20
mongodb_version : " 3.2"
21
21
22
- mongodb_force_wait_for_port : false # When not forced, the role will wait for mongod port to become available only with systemd
23
- mongodb_pymongo_from_pip : true # Install latest PyMongo via PIP or package manager
24
- mongodb_pymongo_pip_version : " 3.2.2"
25
-
26
- mongodb_disable_thp : true
27
-
22
+ mongodb_force_wait_for_port : false # When not forced, the role will wait for mongod port to become available only with systemd
23
+ mongodb_pymongo_from_pip : true # Install latest PyMongo via PIP or package manager
24
+ mongodb_user_update_password : " on_create" # MongoDB user password update default policy
28
25
mongodb_manage_service : true
29
26
30
27
mongodb_user : mongodb
@@ -77,16 +74,6 @@ mongodb_mms_group_id: ""
77
74
mongodb_mms_api_key : " "
78
75
mongodb_mms_base_url : https://mms.mongodb.com
79
76
80
- # Log rotation
81
- mongodb_logrotate : true # Rotate mongodb logs.
82
- mongodb_logrotate_options :
83
- - compress
84
- - copytruncate
85
- - daily
86
- - dateext
87
- - rotate 7
88
- - size 10M
89
-
90
77
# password for inter-process authentication
91
78
# please regenerate this file on production environment with command 'openssl rand -base64 741'
92
79
mongodb_keyfile_content : |
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ mongodb_apt_key_id: "{{ 'EA312927' if mongodb_version[0:3] == '3.2' else '7F0CEB
7
7
mongodb_pymongo_from_pip : true # Install latest PyMongo via PIP or package manager
8
8
9
9
mongodb_force_wait_for_port : false
10
- mongodb_disable_thp : true
11
10
mongodb_user_update_password : " on_create" # MongoDB user password update default policy
12
11
mongodb_manage_service : true
13
12
@@ -62,16 +61,6 @@ mongodb_mms_group_id: ""
62
61
mongodb_mms_api_key : " "
63
62
mongodb_mms_base_url : https://mms.mongodb.com
64
63
65
- # Log rotation
66
- mongodb_logrotate : true # Rotate mongodb logs.
67
- mongodb_logrotate_options :
68
- - compress
69
- - copytruncate
70
- - daily
71
- - dateext
72
- - rotate 7
73
- - size 10M
74
-
75
64
# password for inter-process authentication
76
65
# please regenerate this file on production environment with command 'openssl rand -base64 741'
77
66
mongodb_keyfile_content : |
Original file line number Diff line number Diff line change 9
9
mode : 0600
10
10
when : mongodb_replication_replset and mongodb_replication_replset != ''
11
11
12
- - name : Configure log rotation
13
- template : src=logrotate.conf.j2 dest=/etc/logrotate.d/mongodb.conf
14
- when : mongodb_logrotate
15
-
16
12
- name : set mongodb gid
17
13
group : name=mongodb gid={{ mongodb_gid }} state=present
18
14
when : mongodb_gid
40
36
template : src=mongod.conf.j2 dest=/etc/mongod.conf backup=yes owner=root group=root mode=0644
41
37
register : config_result
42
38
43
- - name : Install sysfsutils package
44
- apt : name=sysfsutils state=present
45
- when : ansible_os_family == 'Debian' and mongodb_disable_thp
46
-
47
- - name : Create /etc/sysfs.d direcroty
48
- file :
49
- path : /etc/sysfs.d
50
- group : root
51
- state : directory
52
- mode : 0755
53
- owner : root
54
- when : ansible_os_family == 'Debian' and mongodb_disable_thp
55
-
56
- - name : Create sysfs config
57
- copy :
58
- src : hugepages.conf
59
- dest : /etc/sysfs.d/hugepages.conf
60
- owner : root
61
- group : root
62
- mode : 0644
63
- when : ansible_os_family == 'Debian' and mongodb_disable_thp
64
- notify : restart sysfsutils
65
-
66
39
- name : mongodb restart
67
40
service : name={{ mongodb_daemon_name }} state=restarted
68
41
when : config_result|changed and mongodb_manage_service
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
22
roles :
23
23
- role : greendayonfire.mongodb
24
24
when : " 'mongo' in group_names"
25
-
26
- - hosts : localhost
27
- become : no
28
- gather_facts : no
29
- tasks :
30
- - name : Run MongoDB cluster in Docker
31
- docker :
32
- name : " {{ item }}"
33
- image : " {{ image_name }}"
34
- command : " /sbin/init"
35
- state : absent
36
- with_items :
37
- - mongo1
38
- - mongo2
39
- - mongo3
25
+
You can’t perform that action at this time.
0 commit comments