Skip to content

Commit 551faac

Browse files
committed
just remove overrides and use local vars
1 parent 126c7a1 commit 551faac

File tree

2 files changed

+13
-24
lines changed

2 files changed

+13
-24
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ test-with-ironic: ## Launch test suite with Ironic
9898
test-configure-object: TEST_OUTFILE ?= tests/logs/test_configure_object_out_$(shell date +%FT%T%Z).log
9999
test-configure-object: ## Configure Swift object store to use Ceph RGW
100100
mkdir -p tests/logs
101-
ANSIBLE_CONFIG=$(TEST_CONFIG) ansible-playbook -v -i $(TEST_INVENTORY) -e @$(TEST_SECRETS) -e @$(TEST_VARS) -e @$(TEST_CEPH_OVERRIDES) $(TEST_ARGS) tests/playbooks/configure_swift_rgw.yaml 2>&1 | tee $(TEST_OUTFILE)
101+
ANSIBLE_CONFIG=$(TEST_CONFIG) ansible-playbook -v -i $(TEST_INVENTORY) -e @$(TEST_SECRETS) -e @$(TEST_VARS) $(TEST_ARGS) tests/playbooks/configure_swift_rgw.yaml 2>&1 | tee $(TEST_OUTFILE)
102102

103103
##@ DOCS
104104

tests/playbooks/configure_swift_rgw.yaml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@
33
hosts: localhost
44
gather_facts: false
55
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-
156
- name: Extract Swift password from OpenShift secret
167
ansible.builtin.shell: |
178
oc get secret osp-secret -o json | jq -r '.data.SwiftPassword' | base64 -d
@@ -28,25 +19,17 @@
2819
keystone_url: "{{ keystone_protocol | default('http') }}://{{ keystone_svc_lb_ip.stdout | ansible.utils.ipwrap }}:5000"
2920
when: keystone_svc_lb_ip.stdout | length > 0
3021

31-
- name: Set Ceph relevant network facts
22+
- name: Set variables for Ceph RGW configuration
3223
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 }}"
4626

4727
- name: Configure Ceph RGW Keystone settings
4828
hosts: "{{ groups['ceph'][0] | default([]) }}"
4929
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'] }}"
5033
tasks:
5134
- name: Configure Ceph RGW Keystone settings
5235
ansible.builtin.shell: |
@@ -61,7 +44,13 @@
6144
gather_facts: true
6245
vars:
6346
shell_header: "set -euo pipefail"
47+
ceph_storage_net_prefix: "2620:cf:cf:cccc"
6448
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+
6554
- name: Configure swift endpoints to use rgw
6655
ansible.builtin.import_role:
6756
name: ceph_migrate

0 commit comments

Comments
 (0)