diff --git a/group_vars/rgws.yml.sample b/group_vars/rgws.yml.sample index 38b7e3cf7..b756756e3 100644 --- a/group_vars/rgws.yml.sample +++ b/group_vars/rgws.yml.sample @@ -24,9 +24,9 @@ dummy: #rgw_pull_proto: "http" -######## -#TUNING# -######## +########## +# TUNING # +########## # To support buckets with a very large number of objects it's # important to split them into shards. We suggest about 100K @@ -67,6 +67,14 @@ dummy: #rgw_config_keys: "/" # DON'T TOUCH ME +############# +# MULTISITE # +############# +#rgw_multisite: false +#rgw_zonegroup: "" +#rgw_zone: "" + + ########### # SYSTEMD # ########### diff --git a/roles/ceph-rgw/defaults/main.yml b/roles/ceph-rgw/defaults/main.yml index d8587fa46..75f9cc49f 100644 --- a/roles/ceph-rgw/defaults/main.yml +++ b/roles/ceph-rgw/defaults/main.yml @@ -16,9 +16,9 @@ rgw_pull_port: "{{ radosgw_civetweb_port }}" rgw_pull_proto: "http" -######## -#TUNING# -######## +########## +# TUNING # +########## # To support buckets with a very large number of objects it's # important to split them into shards. We suggest about 100K @@ -59,6 +59,14 @@ ceph_config_keys: [] # DON'T TOUCH ME rgw_config_keys: "/" # DON'T TOUCH ME +############# +# MULTISITE # +############# +rgw_multisite: false +rgw_zonegroup: "" +rgw_zone: "" + + ########### # SYSTEMD # ########### diff --git a/roles/ceph-rgw/tasks/docker/container_env_facts.yml b/roles/ceph-rgw/tasks/docker/container_env_facts.yml new file mode 100644 index 000000000..1d4637302 --- /dev/null +++ b/roles/ceph-rgw/tasks/docker/container_env_facts.yml @@ -0,0 +1,12 @@ +--- +- name: set_fact docker_env_args '-e RGW_ZONEGROUP={{ rgw_zonegroup }}' + set_fact: + docker_env_args: -e RGW_ZONEGROUP={{ rgw_zonegroup }} + when: + - rgw_zonegroup != "" + +- name: set_fact docker_env_args '-e RGW_ZONE={{ rgw_zone }}' + set_fact: + docker_env_args: "{{ docker_env_args | default ('') }} -e RGW_ZONE={{ rgw_zone }}" + when: + - rgw_zone != "" \ No newline at end of file diff --git a/roles/ceph-rgw/tasks/docker/main.yml b/roles/ceph-rgw/tasks/docker/main.yml index 0928e5739..4850e4b7c 100644 --- a/roles/ceph-rgw/tasks/docker/main.yml +++ b/roles/ceph-rgw/tasks/docker/main.yml @@ -1,3 +1,8 @@ --- +- name: include container_env_facts.yml + include: container_env_facts.yml + when: + - containerized_deployment + - name: include start_docker_rgw.yml include: start_docker_rgw.yml diff --git a/roles/ceph-rgw/tasks/main.yml b/roles/ceph-rgw/tasks/main.yml index e760d4bfe..6ae24e997 100644 --- a/roles/ceph-rgw/tasks/main.yml +++ b/roles/ceph-rgw/tasks/main.yml @@ -38,7 +38,7 @@ - name: include multisite/main.yml include: multisite/main.yml when: - - rgw_zone is defined + - rgw_zone != "" - rgw_multisite - ceph_release_num[ceph_release] >= ceph_release_num.jewel # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)