rgw: add a dedicated variable for multisite endpoint

We should give users the possibility to set the IP they want as
multisite endpoint, setting the default value to `{{ ansible_fqdn }}` to
not force them to set this variable.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/3217/head
Guillaume Abrioux 2018-10-26 11:14:12 +02:00 committed by Sébastien Han
parent 474f151450
commit 77d5d128c3
4 changed files with 5 additions and 3 deletions

View File

@ -62,6 +62,7 @@ dummy:
#rgw_zonemaster: true #rgw_zonemaster: true
#rgw_zonesecondary: false #rgw_zonesecondary: false
#rgw_multisite_endpoint_addr: "{{ ansible_fqdn }}"
#rgw_zonegroup: dummy # should be set by the user #rgw_zonegroup: dummy # should be set by the user
#rgw_zone_user: zone.user #rgw_zone_user: zone.user
#rgw_realm: dummy # should be set by the user #rgw_realm: dummy # should be set by the user

View File

@ -54,6 +54,7 @@ rgw_zone: default
rgw_zonemaster: true rgw_zonemaster: true
rgw_zonesecondary: false rgw_zonesecondary: false
rgw_multisite_endpoint_addr: "{{ ansible_fqdn }}"
#rgw_zonegroup: dummy # should be set by the user #rgw_zonegroup: dummy # should be set by the user
#rgw_zone_user: zone.user #rgw_zone_user: zone.user
#rgw_realm: dummy # should be set by the user #rgw_realm: dummy # should be set by the user

View File

@ -7,14 +7,14 @@
- "'No such file or directory' in realmcheck.stderr" - "'No such file or directory' in realmcheck.stderr"
- name: create the zonegroup - name: create the zonegroup
command: radosgw-admin zonegroup create --rgw-zonegroup={{ rgw_zonegroup }} --endpoints=http://{{ ansible_hostname }}:{{ radosgw_frontend_port }} --master --default command: radosgw-admin zonegroup create --rgw-zonegroup={{ rgw_zonegroup }} --endpoints=http://{{ rgw_multisite_endpoint_addr }}:{{ radosgw_frontend_port }} --master --default
delegate_to: "{{ groups[mon_group_name][0] }}" delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: true run_once: true
when: when:
- "'No such file or directory' in zonegroupcheck.stderr" - "'No such file or directory' in zonegroupcheck.stderr"
- name: create the zone - name: create the zone
command: radosgw-admin zone create --rgw-zonegroup={{ rgw_zonegroup }} --rgw-zone={{ rgw_zone }} --endpoints=http://{{ ansible_hostname }}:{{ radosgw_frontend_port }} --access-key={{ system_access_key }} --secret={{ system_secret_key }} --default --master command: radosgw-admin zone create --rgw-zonegroup={{ rgw_zonegroup }} --rgw-zone={{ rgw_zone }} --endpoints=http://{{ rgw_multisite_endpoint_addr }}:{{ radosgw_frontend_port }} --access-key={{ system_access_key }} --secret={{ system_secret_key }} --default --master
delegate_to: "{{ groups[mon_group_name][0] }}" delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: true run_once: true
when: when:

View File

@ -24,7 +24,7 @@
run_once: true run_once: true
- name: create the zone - name: create the zone
command: radosgw-admin zone create --rgw-zonegroup={{ rgw_zonegroup }} --rgw-zone={{ rgw_zone }} --endpoints=http://{{ ansible_hostname }}:{{ radosgw_frontend_port }} --access-key={{ system_access_key }} --secret={{ system_secret_key }} --default command: radosgw-admin zone create --rgw-zonegroup={{ rgw_zonegroup }} --rgw-zone={{ rgw_zone }} --endpoints=http://{{ rgw_multisite_endpoint_addr }}:{{ radosgw_frontend_port }} --access-key={{ system_access_key }} --secret={{ system_secret_key }} --default
delegate_to: "{{ groups[mon_group_name][0] }}" delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: true run_once: true
when: when: