File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,16 @@ mongodb_mms_group_id: ""
91
91
mongodb_mms_api_key : " "
92
92
mongodb_mms_base_url : https://mms.mongodb.com
93
93
94
+ # Log rotation
95
+ mongodb_logrotate : true # Rotate mongodb logs.
96
+ mongodb_logrotate_options :
97
+ - compress
98
+ - copytruncate
99
+ - daily
100
+ - dateext
101
+ - rotate 7
102
+ - size 10M
103
+
94
104
# password for inter-process authentication
95
105
# please regenerate this file on production environment with command 'openssl rand -base64 741'
96
106
mongodb_keyfile_content : |
@@ -138,6 +148,7 @@ Required vars to change on production:
138
148
` ` ` yaml
139
149
mongodb_user_admin_password
140
150
mongodb_root_admin_password
151
+ mongodb_root_backup_name
141
152
142
153
# if you use replication and authorization
143
154
mongodb_security_keyfile
Original file line number Diff line number Diff line change @@ -87,3 +87,6 @@ mongodb_user_admin_password: passw0rd
87
87
88
88
mongodb_root_admin_name : siteRootAdmin
89
89
mongodb_root_admin_password : passw0rd
90
+
91
+ mongodb_root_backup_name : " backupuser"
92
+ mongodb_root_backup_password : " passw0rd"
Original file line number Diff line number Diff line change 49
49
roles : " root"
50
50
}
51
51
52
+ - name : create backup user "backupuser"
53
+ mongodb_user :
54
+ database : admin
55
+ name : " {{ item.name }}"
56
+ password : " {{ item.password }}"
57
+ update_password : " {{ mongodb_user_update_password }}"
58
+ roles : " {{ item.roles }}"
59
+ login_port : " {{ mongodb_net_port }}"
60
+ with_items :
61
+ - {
62
+ name : " {{ mongodb_root_backup_name }}" ,
63
+ password : " {{ mongodb_root_backup_password }}" ,
64
+ roles : " backup,clusterMonitor"
65
+ }
66
+
52
67
- name : Move back mongod.conf
53
68
template : src=mongod.conf.j2 dest=/etc/mongod.conf owner=root group=root mode=0644
54
69
You can’t perform that action at this time.
0 commit comments