Skip to content

Commit

Permalink
Merge pull request #41 from kononovn/add_var_render
Browse files Browse the repository at this point in the history
added variables rendering to deploy-ocp-hybrid-multinode.yml playbook
  • Loading branch information
openshift-merge-bot[bot] authored Feb 10, 2025
2 parents 16fae85 + ed13f2b commit cf7936a
Showing 1 changed file with 35 additions and 0 deletions.
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

0 comments on commit cf7936a

Please sign in to comment.