Skip to content

Commit

Permalink
Add hypervisor param to shiftstack playbook execution
Browse files Browse the repository at this point in the history
For being able to resolve shift-on-stack apps endpoints (routes)
hostnames from RHOSO pods it's required to add the DNS record entry
in then dnsmasq service running on the hypervisor.
It needs to be done after shift-on-stack cluster is installed as
the installer is creating the floating IP for the apps endpoints,
and the FIP is not known in advance.
For that purpose the cifmw_target_host param is passed so the playbook
running on the shiftstackclient pod is able to reach the hypervisor.
  • Loading branch information
eurijon committed Dec 24, 2024
1 parent 8462e7d commit 3efa078
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion roles/shiftstack/tasks/test_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,22 @@
state: directory
mode: "0755"

- name: Debug hypervisor ansible_host
ansible.builtin.debug:
msg: "hypervisor ansible_host: {{ hostvars[hostvars['controller-0']['cifmw_hypervisor_host']]['ansible_host'] }} "

- name: "Test Openshift on Openstack with the test configuration '{{ testconfig }}'"
vars:
namespace: "{{ cifmw_shiftstack_client_pod_namespace }}"
pod_name: "{{ cifmw_shiftstack_client_pod_name }}"
command: >-
source .bashrc &&
cd shiftstack-qa &&
ansible-navigator run playbooks/{{ cifmw_shiftstack_run_playbook }} -e @jobs_definitions/{{ testconfig }} -e ocp_cluster_name={{ cifmw_shiftstack_cluster_name }} -e user_cloud={{ cifmw_shiftstack_project_name }}
ansible-navigator run playbooks/{{ cifmw_shiftstack_run_playbook }}
-e @jobs_definitions/{{ testconfig }}
-e ocp_cluster_name={{ cifmw_shiftstack_cluster_name }}
-e user_cloud={{ cifmw_shiftstack_project_name }}
-e hypervisor={{ hostvars[hostvars['controller-0']['cifmw_hypervisor_host']]['ansible_host'] }}
ansible.builtin.include_tasks: exec_command_in_pod.yml

rescue:
Expand Down

0 comments on commit 3efa078

Please sign in to comment.