|
1 | 1 | --- |
2 | | -- name: Build Ceph RGW overrides for configure_object |
| 2 | +- name: Configure Swift to use Ceph RGW |
3 | 3 | hosts: localhost |
4 | | - gather_facts: false |
| 4 | + gather_facts: true |
| 5 | + vars: |
| 6 | + shell_header: "set -euo pipefail" |
| 7 | + rgw_service_name: "rgw.rgw" |
5 | 8 | tasks: |
6 | 9 | - name: Extract Swift password from OpenShift secret |
7 | 10 | ansible.builtin.shell: | |
|
24 | 27 | ceph_keystone_ep: "{{ keystone_url }}" |
25 | 28 | ceph_keystone_swift_pwd: "{{ swift_password_result.stdout }}" |
26 | 29 |
|
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: |
34 | 30 | - name: Configure Ceph RGW Keystone settings |
35 | 31 | ansible.builtin.shell: | |
36 | 32 | sudo cephadm shell -- ceph config set global rgw_keystone_url {{ ceph_keystone_ep }} |
37 | 33 | sudo cephadm shell -- ceph config set global rgw_keystone_admin_password {{ ceph_keystone_swift_pwd }} |
38 | 34 | # 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] }}" |
40 | 37 | changed_when: true |
41 | 38 |
|
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 | | - |
54 | 39 | - name: Configure swift endpoints to use rgw |
55 | 40 | ansible.builtin.import_role: |
56 | 41 | name: ceph_migrate |
|
0 commit comments