Skip to content

Commit 93e6fb1

Browse files
committed
more stuff in the playbook as we cannot do them before adoption
1 parent e4a806e commit 93e6fb1

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

tests/playbooks/configure_swift_rgw.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,40 @@
11
---
2+
- name: Build Ceph RGW overrides for configure_object
3+
hosts: localhost
4+
gather_facts: false
5+
tasks:
6+
- name: Extract Swift password from OpenShift secret
7+
ansible.builtin.shell: |
8+
oc get secret osp-secret -o json | jq -r '.data.SwiftPassword' | base64 -d
9+
register: swift_password_result
10+
changed_when: false
11+
12+
- name: Get keystone-internal service details
13+
ansible.builtin.shell: "oc get svc keystone-internal -o json | jq -r '.status.loadBalancer.ingress[0].ip'"
14+
register: keystone_svc_lb_ip
15+
changed_when: false
16+
17+
- name: Construct Keystone service URL
18+
ansible.builtin.set_fact:
19+
keystone_url: "{{ keystone_protocol | default('http') }}://{{ keystone_svc_lb_ip.stdout | ansible.utils.ipwrap }}:5000"
20+
when: keystone_svc_lb_ip.stdout | length > 0
21+
22+
- name: Set Ceph relevant network facts
23+
ansible.builtin.set_fact:
24+
ceph_storage_net_prefix: "2620:cf:cf:cccc"
25+
26+
- name: Build ceph RGW overrides for configure_object
27+
ansible.builtin.blockinfile:
28+
marker_begin: "BEGIN ceph nodes vars for configure rgw object"
29+
marker_end: "END ceph nodes vars for configure rgw object"
30+
path: "{{ dpa_dir }}/tests/ceph_overrides.yaml"
31+
block: |
32+
ceph_keystone_ep: "{{ keystone_url }}"
33+
ceph_keystone_swift_pwd: "{{ swift_password_result.stdout }}"
34+
# rgw vip is required by configure_object task
35+
ceph_rgw_virtual_ips_list:
36+
- {{ ceph_storage_net_prefix }}::2/64
37+
238
- name: Configure Ceph RGW Keystone settings
339
hosts: "{{ groups['ceph'][0] | default([]) }}"
440
gather_facts: true

0 commit comments

Comments
 (0)