|
3 | 3 | hosts: localhost |
4 | 4 | gather_facts: false |
5 | 5 | tasks: |
6 | | - - name: Set variables for ceph overrides generation |
7 | | - ansible.builtin.set_fact: |
8 | | - ansible_user_dir: "{{ ansible_user_dir | default(ansible_env.HOME) }}" |
9 | | - dpa_dir: >- |
10 | | - {{ dpa_dir_override | default( |
11 | | - ansible_user_dir + |
12 | | - '/src/github.com/openstack-k8s-operators/data-plane-adoption' |
13 | | - ) }} |
14 | | -
|
15 | 6 | - name: Extract Swift password from OpenShift secret |
16 | 7 | ansible.builtin.shell: | |
17 | 8 | oc get secret osp-secret -o json | jq -r '.data.SwiftPassword' | base64 -d |
|
28 | 19 | keystone_url: "{{ keystone_protocol | default('http') }}://{{ keystone_svc_lb_ip.stdout | ansible.utils.ipwrap }}:5000" |
29 | 20 | when: keystone_svc_lb_ip.stdout | length > 0 |
30 | 21 |
|
31 | | - - name: Set Ceph relevant network facts |
| 22 | + - name: Set variables for Ceph RGW configuration |
32 | 23 | ansible.builtin.set_fact: |
33 | | - ceph_storage_net_prefix: "2620:cf:cf:cccc" |
34 | | - |
35 | | - - name: Build ceph RGW overrides for configure_object |
36 | | - ansible.builtin.blockinfile: |
37 | | - marker_begin: "BEGIN ceph nodes vars for configure rgw object" |
38 | | - marker_end: "END ceph nodes vars for configure rgw object" |
39 | | - path: "{{ dpa_dir }}/tests/ceph_overrides.yaml" |
40 | | - block: | |
41 | | - ceph_keystone_ep: "{{ keystone_url }}" |
42 | | - ceph_keystone_swift_pwd: "{{ swift_password_result.stdout }}" |
43 | | - # rgw vip is required by configure_object task |
44 | | - ceph_rgw_virtual_ips_list: |
45 | | - - {{ ceph_storage_net_prefix }}::2/64 |
| 24 | + ceph_keystone_ep: "{{ keystone_url }}" |
| 25 | + ceph_keystone_swift_pwd: "{{ swift_password_result.stdout }}" |
46 | 26 |
|
47 | 27 | - name: Configure Ceph RGW Keystone settings |
48 | 28 | hosts: "{{ groups['ceph'][0] | default([]) }}" |
49 | 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'] }}" |
50 | 33 | tasks: |
51 | 34 | - name: Configure Ceph RGW Keystone settings |
52 | 35 | ansible.builtin.shell: | |
|
61 | 44 | gather_facts: true |
62 | 45 | vars: |
63 | 46 | shell_header: "set -euo pipefail" |
| 47 | + ceph_storage_net_prefix: "2620:cf:cf:cccc" |
64 | 48 | tasks: |
| 49 | + - name: Set Ceph RGW virtual IPs list |
| 50 | + ansible.builtin.set_fact: |
| 51 | + ceph_rgw_virtual_ips_list: |
| 52 | + - "{{ ceph_storage_net_prefix }}::2/64" |
| 53 | + |
65 | 54 | - name: Configure swift endpoints to use rgw |
66 | 55 | ansible.builtin.import_role: |
67 | 56 | name: ceph_migrate |
|
0 commit comments