Skip to content

Commit 1e49fb1

Browse files
committed
making the playbook clean
1 parent 8796750 commit 1e49fb1

File tree

1 file changed

+7
-22
lines changed

1 file changed

+7
-22
lines changed

tests/playbooks/configure_swift_rgw.yaml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
---
2-
- name: Build Ceph RGW overrides for configure_object
2+
- name: Configure Swift to use Ceph RGW
33
hosts: localhost
4-
gather_facts: false
4+
gather_facts: true
5+
vars:
6+
shell_header: "set -euo pipefail"
7+
rgw_service_name: "rgw.rgw"
58
tasks:
69
- name: Extract Swift password from OpenShift secret
710
ansible.builtin.shell: |
@@ -24,33 +27,15 @@
2427
ceph_keystone_ep: "{{ keystone_url }}"
2528
ceph_keystone_swift_pwd: "{{ swift_password_result.stdout }}"
2629

27-
- name: Configure Ceph RGW Keystone settings
28-
hosts: "{{ groups['ceph'][0] | default([]) }}"
29-
gather_facts: true
30-
vars:
31-
ceph_keystone_ep: "{{ hostvars['localhost']['ceph_keystone_ep'] }}"
32-
ceph_keystone_swift_pwd: "{{ hostvars['localhost']['ceph_keystone_swift_pwd'] }}"
33-
tasks:
3430
- name: Configure Ceph RGW Keystone settings
3531
ansible.builtin.shell: |
3632
sudo cephadm shell -- ceph config set global rgw_keystone_url {{ ceph_keystone_ep }}
3733
sudo cephadm shell -- ceph config set global rgw_keystone_admin_password {{ ceph_keystone_swift_pwd }}
3834
# refresh rgw after updating keystone rgw config
39-
sudo cephadm shell -- ceph orch redeploy rgw.rgw
35+
sudo cephadm shell -- ceph orch redeploy {{ rgw_service_name }}
36+
delegate_to: "{{ groups['ceph'][0] }}"
4037
changed_when: true
4138

42-
- name: Configure swift object store
43-
hosts: localhost
44-
gather_facts: true
45-
vars:
46-
shell_header: "set -euo pipefail"
47-
#ceph_rgw_vip: "2620:cf:cf:cccc::2/64" (ipv6) or "172.18.0.2/24" (ipv4)
48-
tasks:
49-
- name: Set Ceph RGW virtual IPs list
50-
ansible.builtin.set_fact:
51-
ceph_rgw_virtual_ips_list:
52-
- "{{ ceph_rgw_vip }}"
53-
5439
- name: Configure swift endpoints to use rgw
5540
ansible.builtin.import_role:
5641
name: ceph_migrate

0 commit comments

Comments
 (0)