File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
- name : Replication configuration
4
4
mongodb_replication :
5
- login_host : " {{ mongodb_login_host |default('localhost') }}"
5
+ login_host : " {{ mongodb_login_host|default('localhost') }}"
6
6
login_port : " {{ mongodb_login_port|default(27017) }}"
7
7
login_user : " {{ mongodb_root_admin_name }}"
8
8
login_password : " {{ mongodb_root_admin_password }}"
9
9
replica_set : " {{ mongodb_conf_replSet }}"
10
10
host_name : " {{ item.host_name }}"
11
- host_port : " {{ item.host_port }}"
11
+ host_port : " {{ item.host_port|default(27017) }}"
12
12
host_type : " {{ item.host_type|default('replica') }}"
13
- when : mongodb_conf_auth == "yes" and mongodb_replication_hosts is defined
14
- register : mongodb_replication_status
13
+ when : mongodb_conf_auth and mongodb_replication_params is defined
14
+ with_items :
15
+ - " {{ mongodb_replication_params }}"
16
+
17
+ - name : Replication configuration without auth
18
+ mongodb_replication :
19
+ login_host : " {{ mongodb_login_host|default('localhost') }}"
20
+ login_port : " {{ mongodb_login_port|default(27017) }}"
21
+ replica_set : " {{ mongodb_conf_replSet }}"
22
+ host_name : " {{ item.host_name }}"
23
+ host_port : " {{ item.host_port|default(27017) }}"
24
+ host_type : " {{ item.host_type|default('replica') }}"
25
+ when : not mongodb_conf_auth and mongodb_replication_params is defined
15
26
with_items :
16
27
- " {{ mongodb_replication_params }}"
You can’t perform that action at this time.
0 commit comments