This commit is contained in:
2025-05-12 20:44:42 -05:00
5 changed files with 17 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
---
- name: Create a directory if it does not exist
ansible.builtin.file:
path: "{{ hostvars[groups['matchbox'][0]].assets }}/{{ hostvars[groups['hub-cluster'][0]].cluster_name }}"
path: "{{ hostvars[groups['matchbox'][0]].assets }}/{{ hostvars[groups['hub_cluster'][0]].cluster_name }}"
state: directory
mode: '0755'
become: true
@@ -9,7 +9,7 @@
- name: Copy file with owner and permissions
ansible.builtin.copy:
src: 03-openshift-image/boot-artifacts/
dest: "{{ hostvars[groups['matchbox'][0]].assets }}/{{ hostvars[groups['hub-cluster'][0]].cluster_name }}/"
dest: "{{ hostvars[groups['matchbox'][0]].assets }}/{{ hostvars[groups['hub_cluster'][0]].cluster_name }}/"
owner: matchbox
group: matchbox
mode: '0644'

View File

@@ -1,7 +1,7 @@
apiVersion: v1alpha1
kind: AgentConfig
metadata:
name: {{ hostvars[groups['hub-cluster'][0]].cluster_name }}
name: {{ hostvars[groups['hub_cluster'][0]].cluster_name }}
rendezvousIP: {{ hostvars['ocp-hub'].ip_address }}
bootArtifactsBaseURL: {{ hostvars[groups['matchbox'][0]].http_endpoint }}/assets/hub/
hosts:

View File

@@ -1,25 +1,25 @@
apiVersion: v1
baseDomain: {{ hostvars[groups['hub-cluster'][0]].base_domain }}
baseDomain: {{ hostvars[groups['hub_cluster'][0]].base_domain }}
compute:
- name: worker
replicas: {{ hostvars[groups['hub-cluster'][0]].worker_node_count }}
replicas: {{ hostvars[groups['hub_cluster'][0]].worker_node_count }}
controlPlane:
hyperthreading: Enabled
name: master
replicas: {{ hostvars[groups['hub-cluster'][0]].master_node_count }}
replicas: {{ hostvars[groups['hub_cluster'][0]].master_node_count }}
metadata:
name: {{ hostvars[groups['hub-cluster'][0]].cluster_name }}
name: {{ hostvars[groups['hub_cluster'][0]].cluster_name }}
networking:
clusterNetwork:
- cidr: {{ hostvars[groups['hub-cluster'][0]].cluster_network }}
hostPrefix: {{ hostvars[groups['hub-cluster'][0]].cluster_network_host_prefix }}
- cidr: {{ hostvars[groups['hub_cluster'][0]].cluster_network }}
hostPrefix: {{ hostvars[groups['hub_cluster'][0]].cluster_network_host_prefix }}
machineNetwork:
- cidr: {{ hostvars[groups['hub-cluster'][0]].machine_network }}
- cidr: {{ hostvars[groups['hub_cluster'][0]].machine_network }}
networkType: OVNKubernetes
serviceNetwork:
- {{ hostvars[groups['hub-cluster'][0]].service_network }}
- {{ hostvars[groups['hub_cluster'][0]].service_network }}
platform:
{{ hostvars[groups['hub-cluster'][0]].platform_type }}: {}
{{ hostvars[groups['hub_cluster'][0]].platform_type }}: {}
fips: false
pullSecret: '{{ vault_pull_secret }}'
sshKey: '{{ vault_ssh_key }}'

View File

@@ -1,5 +1,5 @@
// Matcher group for OCP Internal machines
resource "matchbox_group" "{{ hostvars[groups['hub-cluster'][0]].cluster_name }}" {
resource "matchbox_group" "{{ hostvars[groups['hub_cluster'][0]].cluster_name }}" {
name = "{{ hostvars['ocp-hub'].hostname }}" # Physical Server
profile = matchbox_profile.openshift-agent-install.name
selector = {

View File

@@ -1,14 +1,14 @@
// Fedora CoreOS profile
resource "matchbox_profile" "openshift-agent-install" {
name = "{{ hostvars[groups['hub-cluster'][0]].cluster_name }}"
kernel = "/assets/{{ hostvars[groups['hub-cluster'][0]].cluster_name }}/agent.x86_64-vmlinuz"
name = "{{ hostvars[groups['hub_cluster'][0]].cluster_name }}"
kernel = "/assets/{{ hostvars[groups['hub_cluster'][0]].cluster_name }}/agent.x86_64-vmlinuz"
initrd = [
"--name initrd /assets/{{ hostvars[groups['hub-cluster'][0]].cluster_name }}/agent.x86_64-initrd.img"
"--name initrd /assets/{{ hostvars[groups['hub_cluster'][0]].cluster_name }}/agent.x86_64-initrd.img"
]
args = [
"initrd=initrd",
"coreos.live.rootfs_url={{ hostvars[groups['matchbox'][0]].http_endpoint }}/assets/{{ hostvars[groups['hub-cluster'][0]].cluster_name }}/agent.x86_64-rootfs.img",
"coreos.live.rootfs_url={{ hostvars[groups['matchbox'][0]].http_endpoint }}/assets/{{ hostvars[groups['hub_cluster'][0]].cluster_name }}/agent.x86_64-rootfs.img",
"rw",
"ignition.firstboot",
"ignition.platform.id=metal",