File tree Expand file tree Collapse file tree 3 files changed +13
-18
lines changed Expand file tree Collapse file tree 3 files changed +13
-18
lines changed Original file line number Diff line number Diff line change 33
33
roles : " root"
34
34
}
35
35
36
+ - name : create normal users
37
+ mongodb_user :
38
+ database : " {{ item.database }}"
39
+ name : " {{ item.name }}"
40
+ password : " {{ item.password }}"
41
+ roles : " {{ item.roles }}"
42
+ replica_set : " {{ mongodb_conf_replSet }}"
43
+ login_user : " {{ mongodb_user_admin_name }}"
44
+ login_password : " {{ mongodb_user_admin_password }}"
45
+ login_port : " {{ mongodb_conf_port }}"
46
+ with_items :
47
+ - " {{ mongodb_users }}"
48
+
36
49
- name : Move back mongod.conf
37
50
template : src=mongod.conf.j2 dest=/etc/mongod.conf owner=root group=root mode=0644
38
51
Original file line number Diff line number Diff line change 20
20
when : mongodb_conf_auth and not mongodb_conf_replSet
21
21
tags : [mongodb]
22
22
23
- - include : user_add.yml
24
- when : mongodb_conf_auth and mongodb_users
25
- tags : [mongodb]
26
-
27
23
- include : mms-agent.yml
28
24
when : mongodb_mms_api_key != ""
29
25
tags : [mongodb]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments