2018-10-26 22:39:56 +08:00
|
|
|
---
|
|
|
|
- name: fail if rgw_zone is default
|
|
|
|
fail:
|
|
|
|
msg: "rgw_zone cannot be named 'default'"
|
2020-03-09 18:05:01 +08:00
|
|
|
loop: "{{ rgw_instances }}"
|
|
|
|
when: item.rgw_zone is undefined or item.rgw_zone == 'default'
|
2018-10-26 22:39:56 +08:00
|
|
|
|
|
|
|
- name: fail if either rgw_zonemaster or rgw_zonesecondary is undefined
|
|
|
|
fail:
|
|
|
|
msg: "rgw_zonemaster and rgw_zonesecondary must be defined"
|
2021-01-15 00:52:39 +08:00
|
|
|
loop: "{{ rgw_instances }}"
|
|
|
|
when: item.rgw_zonemaster | default(rgw_zonemaster) is undefined or item.rgw_zonesecondary | default(rgw_zonesecondary) is undefined
|
2018-10-26 22:39:56 +08:00
|
|
|
|
2018-10-31 00:12:33 +08:00
|
|
|
- name: fail if rgw_zonemaster and rgw_zonesecondary are both true
|
2018-10-26 22:39:56 +08:00
|
|
|
fail:
|
|
|
|
msg: "rgw_zonemaster and rgw_zonesecondary cannot both be true"
|
2021-01-15 00:52:39 +08:00
|
|
|
loop: "{{ rgw_instances }}"
|
2018-10-26 22:39:56 +08:00
|
|
|
when:
|
2021-01-15 00:52:39 +08:00
|
|
|
- item.rgw_zonemaster | default(rgw_zonemaster) | bool
|
|
|
|
- item.rgw_zonesecondary | default(rgw_zonesecondary) | bool
|
2018-10-26 22:39:56 +08:00
|
|
|
|
|
|
|
- name: fail if rgw_zonegroup is not set
|
|
|
|
fail:
|
|
|
|
msg: "rgw_zonegroup has not been set by the user"
|
2020-03-09 18:05:01 +08:00
|
|
|
loop: "{{ rgw_instances }}"
|
|
|
|
when: item.rgw_zonegroup is undefined
|
2018-10-26 22:39:56 +08:00
|
|
|
|
|
|
|
- name: fail if rgw_zone_user is not set
|
|
|
|
fail:
|
|
|
|
msg: "rgw_zone_user has not been set by the user"
|
2020-03-09 18:05:01 +08:00
|
|
|
loop: "{{ rgw_instances }}"
|
|
|
|
when: item.rgw_zone_user is undefined
|
2018-10-26 22:39:56 +08:00
|
|
|
|
2019-10-05 03:31:25 +08:00
|
|
|
- name: fail if rgw_zone_user_display_name is not set
|
|
|
|
fail:
|
|
|
|
msg: "rgw_zone_user_display_name has not been set by the user"
|
2020-03-09 18:05:01 +08:00
|
|
|
loop: "{{ rgw_instances }}"
|
|
|
|
when: item.rgw_zone_user_display_name is undefined
|
2019-10-05 03:31:25 +08:00
|
|
|
|
2018-10-26 22:39:56 +08:00
|
|
|
- name: fail if rgw_realm is not set
|
|
|
|
fail:
|
|
|
|
msg: "rgw_realm has not been set by the user"
|
2020-03-09 18:05:01 +08:00
|
|
|
loop: "{{ rgw_instances }}"
|
|
|
|
when: item.rgw_realm is undefined
|
2018-10-26 22:39:56 +08:00
|
|
|
|
|
|
|
- name: fail if system_access_key is not set
|
|
|
|
fail:
|
|
|
|
msg: "system_access_key has not been set by the user"
|
2020-03-09 18:05:01 +08:00
|
|
|
loop: "{{ rgw_instances }}"
|
|
|
|
when: item.system_access_key is undefined
|
2018-10-26 22:39:56 +08:00
|
|
|
|
|
|
|
- name: fail if system_secret_key is not set
|
|
|
|
fail:
|
|
|
|
msg: "system_secret_key has not been set by the user"
|
2020-03-09 18:05:01 +08:00
|
|
|
loop: "{{ rgw_instances }}"
|
|
|
|
when: item.system_secret_key is undefined
|
2018-10-26 22:39:56 +08:00
|
|
|
|
2020-03-09 18:05:01 +08:00
|
|
|
- name: fail if endpoint is not set
|
2018-10-26 22:39:56 +08:00
|
|
|
fail:
|
2020-03-09 18:05:01 +08:00
|
|
|
msg: "endpoint has not been set by the user"
|
|
|
|
loop: "{{ rgw_instances }}"
|
2018-10-26 22:39:56 +08:00
|
|
|
when:
|
2021-01-15 00:52:39 +08:00
|
|
|
- item.rgw_zonesecondary | default(rgw_zonesecondary) | bool
|
|
|
|
- rgw_pull_port is undefined and rgw_pullhost is undefined and item.rgw_pull_proto | default(rgw_pull_proto) is undefined
|
|
|
|
- item.endpoint is undefined
|
|
|
|
|