mirror of https://github.com/ceph/ceph-ansible.git
rgw: add rgw_multisite for containerized deployments
run commands on containers when containerized deployments. (At the moment, all commands are run on the host only) Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/3217/head
parent
37970a5b3c
commit
710e11668d
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: update period
|
- name: update period
|
||||||
command: radosgw-admin --cluster {{ cluster }} period update --commit
|
command: "{{ docker_exec_cmd }} radosgw-admin --cluster {{ cluster }} period update --commit"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: check if the realm already exists
|
- name: check if the realm already exists
|
||||||
command: radosgw-admin realm get --rgw-realm={{ rgw_realm }}
|
command: "{{ docker_exec_cmd }} radosgw-admin realm get --rgw-realm={{ rgw_realm }}"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
register: realmcheck
|
register: realmcheck
|
||||||
failed_when: False
|
failed_when: False
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
check_mode: no
|
check_mode: no
|
||||||
|
|
||||||
- name: check if the zonegroup already exists
|
- name: check if the zonegroup already exists
|
||||||
command: radosgw-admin zonegroup get --rgw-zonegroup={{ rgw_zonegroup }}
|
command: "{{ docker_exec_cmd }} radosgw-admin zonegroup get --rgw-zonegroup={{ rgw_zonegroup }}"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
register: zonegroupcheck
|
register: zonegroupcheck
|
||||||
failed_when: False
|
failed_when: False
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
check_mode: no
|
check_mode: no
|
||||||
|
|
||||||
- name: check if the zone already exists
|
- name: check if the zone already exists
|
||||||
command: radosgw-admin zone get --rgw-zone={{ rgw_zone }}
|
command: "{{ docker_exec_cmd }} radosgw-admin zone get --rgw-zone={{ rgw_zone }}"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
register: zonecheck
|
register: zonecheck
|
||||||
failed_when: False
|
failed_when: False
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
check_mode: no
|
check_mode: no
|
||||||
|
|
||||||
- name: check if the system user already exists
|
- name: check if the system user already exists
|
||||||
command: radosgw-admin user info --uid={{ rgw_zone_user }}
|
command: "{{ docker_exec_cmd }} radosgw-admin user info --uid={{ rgw_zone_user }}"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
register: usercheck
|
register: usercheck
|
||||||
failed_when: False
|
failed_when: False
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
---
|
---
|
||||||
- name: create the realm
|
- name: create the realm
|
||||||
command: radosgw-admin realm create --rgw-realm={{ rgw_realm }} --default
|
command: "{{ docker_exec_cmd }} radosgw-admin realm create --rgw-realm={{ rgw_realm }} --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 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://{{ rgw_multisite_endpoint_addr }}:{{ radosgw_frontend_port }} --master --default
|
command: "{{ docker_exec_cmd }} 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://{{ rgw_multisite_endpoint_addr }}:{{ radosgw_frontend_port }} --access-key={{ system_access_key }} --secret={{ system_secret_key }} --default --master
|
command: "{{ docker_exec_cmd }} 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:
|
||||||
- "'No such file or directory' in zonecheck.stderr"
|
- "'No such file or directory' in zonecheck.stderr"
|
||||||
|
|
||||||
- name: create the zone user
|
- name: create the zone user
|
||||||
command: radosgw-admin user create --uid={{ rgw_zone_user }} --display-name="Zone User" --access-key={{ system_access_key }} --secret={{ system_secret_key }} --system
|
command: "{{ docker_exec_cmd }} radosgw-admin user create --uid={{ rgw_zone_user }} --display-name=\"Zone User\" --access-key={{ system_access_key }} --secret={{ system_secret_key }} --system"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
---
|
---
|
||||||
- name: fetch the realm
|
- name: fetch the realm
|
||||||
command: radosgw-admin realm pull --url={{ rgw_pull_proto }}://{{ rgw_pullhost }}:{{ rgw_pull_port }} --access-key={{ system_access_key }} --secret={{ system_secret_key }}
|
command: "{{ docker_exec_cmd }} radosgw-admin realm pull --url={{ rgw_pull_proto }}://{{ rgw_pullhost }}:{{ rgw_pull_port }} --access-key={{ system_access_key }} --secret={{ system_secret_key }}"
|
||||||
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 realmcheck.stderr"
|
- "'No such file or directory' in realmcheck.stderr"
|
||||||
|
|
||||||
- name: fetch the period
|
- name: fetch the period
|
||||||
command: radosgw-admin period pull --url={{ rgw_pull_proto }}://{{ rgw_pullhost }}:{{ rgw_pull_port }} --access-key={{ system_access_key }} --secret={{ system_secret_key }}
|
command: "{{ docker_exec_cmd }} radosgw-admin period pull --url={{ rgw_pull_proto }}://{{ rgw_pullhost }}:{{ rgw_pull_port }} --access-key={{ system_access_key }} --secret={{ system_secret_key }}"
|
||||||
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 realmcheck.stderr"
|
- "'No such file or directory' in realmcheck.stderr"
|
||||||
|
|
||||||
- name: set default realm
|
- name: set default realm
|
||||||
command: radosgw-admin realm default --rgw-realm={{ rgw_realm }}
|
command: "{{ docker_exec_cmd }} radosgw-admin realm default --rgw-realm={{ rgw_realm }}"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
|
|
||||||
- name: set default zonegroup
|
- name: set default zonegroup
|
||||||
command: radosgw-admin zonegroup default --rgw-zonegroup={{ rgw_zonegroup }}
|
command: "{{ docker_exec_cmd }} radosgw-admin zonegroup default --rgw-zonegroup={{ rgw_zonegroup }}"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
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://{{ rgw_multisite_endpoint_addr }}:{{ radosgw_frontend_port }} --access-key={{ system_access_key }} --secret={{ system_secret_key }} --default
|
command: "{{ docker_exec_cmd }} 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:
|
||||||
|
|
Loading…
Reference in New Issue