create templates for terraform files

This commit is contained in:
2025-03-23 00:55:30 -05:00
parent 6c0d599c0e
commit 79d23cf5d9
19 changed files with 272 additions and 16 deletions

View File

@@ -0,0 +1,7 @@
# Configure the OpenShift Agent Installer and Matchbox
## Reference Document
<https://docs.redhat.com/en/documentation/openshift_container_platform/4.17/epub/installing_an_on-premise_cluster_with_the_agent-based_installer/prepare-pxe-assets-agent#prepare-pxe-assets-agent>
Recap of image creation is in 10-sno-hub-cluster/02-matchbox/.openshift_install.log

View File

@@ -0,0 +1,33 @@
apiVersion: v1alpha1
kind: AgentConfig
metadata:
name: hub
rendezvousIP: 10.1.71.10
bootArtifactsBaseURL: https://matchbox.int.mk-labs.cloud:8080/assets/hub/
hosts:
- hostname: hub
role: master
interfaces:
- name: enp1s0f0
macAddress: 98:B7:85:1E:C6:F1
networkConfig:
interfaces:
- name: enp1s0f0
type: ethernet
state: up
identifier: mac-address
mac-address: 98:B7:85:1E:C6:F1
ipv4:
enabled: true
dhcp: true
dns-resolver:
config:
server:
- 10.1.71.254
- 10.1.71.253
routes:
config:
- destination: 0.0.0.0/0
next-hop-address: 10.1.71.1
next-hop-interface: enp1s0f0
table-id: 254

View File

@@ -0,0 +1,5 @@
---
- name: OpenShift image creation
ansible.builtin.command: /usr/local/bin/openshift-install agent create pxe-files
args:
chdir: 03-openshift-image

View File

@@ -0,0 +1,15 @@
---
- name: Create a directory if it does not exist
ansible.builtin.file:
path: "{{ matchbox_assets }}/{{ hub_cluster_name }}"
state: directory
mode: '0755'
become: true
- name: Copy file with owner and permissions
ansible.builtin.copy:
src: 03-openshift-image/boot-artifacts/
dest: "{{ matchbox_assets }}/{{ hub_cluster_name }}/"
owner: matchbox
group: matchbox
become: true