Merge branch 'main' of https://github.com/rblundon/homelab
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Create a directory if it does not exist
|
- name: Create a directory if it does not exist
|
||||||
ansible.builtin.file:
|
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
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
become: true
|
become: true
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
- name: Copy file with owner and permissions
|
- name: Copy file with owner and permissions
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: 03-openshift-image/boot-artifacts/
|
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
|
owner: matchbox
|
||||||
group: matchbox
|
group: matchbox
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
apiVersion: v1alpha1
|
apiVersion: v1alpha1
|
||||||
kind: AgentConfig
|
kind: AgentConfig
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ hostvars[groups['hub-cluster'][0]].cluster_name }}
|
name: {{ hostvars[groups['hub_cluster'][0]].cluster_name }}
|
||||||
rendezvousIP: {{ hostvars['ocp-hub'].ip_address }}
|
rendezvousIP: {{ hostvars['ocp-hub'].ip_address }}
|
||||||
bootArtifactsBaseURL: {{ hostvars[groups['matchbox'][0]].http_endpoint }}/assets/hub/
|
bootArtifactsBaseURL: {{ hostvars[groups['matchbox'][0]].http_endpoint }}/assets/hub/
|
||||||
hosts:
|
hosts:
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
baseDomain: {{ hostvars[groups['hub-cluster'][0]].base_domain }}
|
baseDomain: {{ hostvars[groups['hub_cluster'][0]].base_domain }}
|
||||||
compute:
|
compute:
|
||||||
- name: worker
|
- name: worker
|
||||||
replicas: {{ hostvars[groups['hub-cluster'][0]].worker_node_count }}
|
replicas: {{ hostvars[groups['hub_cluster'][0]].worker_node_count }}
|
||||||
controlPlane:
|
controlPlane:
|
||||||
hyperthreading: Enabled
|
hyperthreading: Enabled
|
||||||
name: master
|
name: master
|
||||||
replicas: {{ hostvars[groups['hub-cluster'][0]].master_node_count }}
|
replicas: {{ hostvars[groups['hub_cluster'][0]].master_node_count }}
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ hostvars[groups['hub-cluster'][0]].cluster_name }}
|
name: {{ hostvars[groups['hub_cluster'][0]].cluster_name }}
|
||||||
networking:
|
networking:
|
||||||
clusterNetwork:
|
clusterNetwork:
|
||||||
- cidr: {{ hostvars[groups['hub-cluster'][0]].cluster_network }}
|
- cidr: {{ hostvars[groups['hub_cluster'][0]].cluster_network }}
|
||||||
hostPrefix: {{ hostvars[groups['hub-cluster'][0]].cluster_network_host_prefix }}
|
hostPrefix: {{ hostvars[groups['hub_cluster'][0]].cluster_network_host_prefix }}
|
||||||
machineNetwork:
|
machineNetwork:
|
||||||
- cidr: {{ hostvars[groups['hub-cluster'][0]].machine_network }}
|
- cidr: {{ hostvars[groups['hub_cluster'][0]].machine_network }}
|
||||||
networkType: OVNKubernetes
|
networkType: OVNKubernetes
|
||||||
serviceNetwork:
|
serviceNetwork:
|
||||||
- {{ hostvars[groups['hub-cluster'][0]].service_network }}
|
- {{ hostvars[groups['hub_cluster'][0]].service_network }}
|
||||||
platform:
|
platform:
|
||||||
{{ hostvars[groups['hub-cluster'][0]].platform_type }}: {}
|
{{ hostvars[groups['hub_cluster'][0]].platform_type }}: {}
|
||||||
fips: false
|
fips: false
|
||||||
pullSecret: '{{ vault_pull_secret }}'
|
pullSecret: '{{ vault_pull_secret }}'
|
||||||
sshKey: '{{ vault_ssh_key }}'
|
sshKey: '{{ vault_ssh_key }}'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// Matcher group for OCP Internal machines
|
// 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
|
name = "{{ hostvars['ocp-hub'].hostname }}" # Physical Server
|
||||||
profile = matchbox_profile.openshift-agent-install.name
|
profile = matchbox_profile.openshift-agent-install.name
|
||||||
selector = {
|
selector = {
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
// Fedora CoreOS profile
|
// Fedora CoreOS profile
|
||||||
resource "matchbox_profile" "openshift-agent-install" {
|
resource "matchbox_profile" "openshift-agent-install" {
|
||||||
name = "{{ hostvars[groups['hub-cluster'][0]].cluster_name }}"
|
name = "{{ hostvars[groups['hub_cluster'][0]].cluster_name }}"
|
||||||
kernel = "/assets/{{ hostvars[groups['hub-cluster'][0]].cluster_name }}/agent.x86_64-vmlinuz"
|
kernel = "/assets/{{ hostvars[groups['hub_cluster'][0]].cluster_name }}/agent.x86_64-vmlinuz"
|
||||||
initrd = [
|
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 = [
|
args = [
|
||||||
"initrd=initrd",
|
"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",
|
"rw",
|
||||||
"ignition.firstboot",
|
"ignition.firstboot",
|
||||||
"ignition.platform.id=metal",
|
"ignition.platform.id=metal",
|
||||||
|
|||||||
Reference in New Issue
Block a user