Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added variables rendering to deploy-ocp-hybrid-multinode.yml playbook #41

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions playbooks/deploy-ocp-hybrid-multinode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,51 @@
# - This playbook assumes the hypervisor and bastion hosts are pre-installed and ready.
# - Test in a non-production environment before deploying.
---
- name: Render nodes variables
hosts: nodes
gather_facts: false
tasks:
- name: Render nodes variables
delegate_to: bastion
ansible.builtin.set_fact:
network_config: "{{ network_config_string | from_yaml }}"
mac_interface_map: "{{ mac_interface_map_string | from_yaml }}"

- name: Render masters variables
hosts: masters
gather_facts: false
tasks:
- name: Render masters variables
delegate_to: bastion
ansible.builtin.set_fact:
network_interfaces: "{{ network_interfaces_string | from_yaml }}"

- name: Setup bastion environment and generate manifests for cluster deployment
hosts: bastion
vars:
release: "4.17"
pull_secret: "{{ pull_secret_string | b64decode }}"
tasks:

- name: Render bastion variables
delegate_to: bastion
ansible.builtin.set_fact:
extra_cluster_networks: "{{ extra_cluster_networks_string | from_yaml }}"
extra_machine_networks: "{{ extra_machine_networks_string | from_yaml }}"
extra_service_networks: "{{ extra_service_networks_string | from_yaml }}"
api_vips: "{{ api_vips_string | from_yaml }}"
ingress_vips: "{{ ingress_vips_string | from_yaml }}"

- name: Set openshift-installer path fact
ansible.builtin.set_fact:
openshift_installer_extract_dest_path: "{{ dest_iso_dir }}/wip/extract"

- name: Ensure cluster_name variable is set
ansible.builtin.assert:
that:
- cluster_name is defined
fail_msg: "Please provide cluster_name variable to playbook"

- name: Install dependencies required for the installer
become: true
ansible.builtin.dnf:
Expand Down