Updated mac addresses and disabled boot interfaces
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
cluster_name: "openshift"
|
cluster_name: "openshift"
|
||||||
cluster_version: "4.18.21"
|
cluster_version: "4.18.21"
|
||||||
openshift_installer_download_url: "https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/{{ cluster_version }}/openshift-install-linux.tar.gz"
|
openshift_installer_file: "openshift-install-linux.tar.gz"
|
||||||
openshift_client_download_url: "https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/{{ cluster_version }}/openshift-client-linux.tar.gz"
|
openshift_client_file: "openshift-client-linux.tar.gz"
|
||||||
# cluster_group: "internal_cluster"
|
openshift_installer_download_url: "https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/{{ cluster_version }}/{{ openshift_installer_file }}"
|
||||||
|
openshift_client_download_url: "https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/{{ cluster_version }}/{{ openshift_client_file }}"
|
||||||
worker_node_count: 1
|
worker_node_count: 1
|
||||||
master_node_count: 3
|
master_node_count: 3
|
||||||
cluster_network: "10.128.0.0/14"
|
cluster_network: "10.128.0.0/14"
|
||||||
|
|||||||
@@ -3,9 +3,10 @@
|
|||||||
# OpenShift node
|
# OpenShift node
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
primary_interface: "enp1s0f0"
|
boot_interface: "enp0s31f6"
|
||||||
boot_mac_address: "54:bf:64:60:52:2d"
|
boot_mac_address: "54:bf:64:60:52:2d"
|
||||||
install_mac_address: "00:0a:f7:5d:f3:53"
|
primary_interface: "enp1s0f0"
|
||||||
|
install_mac_address: "98:b7:85:20:47:22"
|
||||||
ip_address: 10.1.71.61
|
ip_address: 10.1.71.61
|
||||||
node_role: "master"
|
node_role: "master"
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,10 @@
|
|||||||
# OpenShift node
|
# OpenShift node
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
primary_interface: "enp1s0f0"
|
boot_interface: "enp0s31f6"
|
||||||
boot_mac_address: "54:bf:64:5f:a2:80"
|
boot_mac_address: "54:bf:64:5f:a2:80"
|
||||||
install_mac_address: "98:b7:85:20:47:3b"
|
primary_interface: "enp1s0f0"
|
||||||
|
install_mac_address: "98:b7:85:20:47:3a"
|
||||||
ip_address: 10.1.71.62
|
ip_address: 10.1.71.62
|
||||||
node_role: "master"
|
node_role: "master"
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,10 @@
|
|||||||
# OpenShift node
|
# OpenShift node
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
primary_interface: "enp1s0f0"
|
boot_interface: "enp0s31f6"
|
||||||
boot_mac_address: "d8:9e:f3:4c:02:a9"
|
boot_mac_address: "d8:9e:f3:4c:02:a9"
|
||||||
install_mac_address: "98:b7:85:20:47:23"
|
primary_interface: "enp1s0f0"
|
||||||
|
install_mac_address: "98:b7:85:1f:89:cf"
|
||||||
ip_address: 10.1.71.63
|
ip_address: 10.1.71.63
|
||||||
node_role: "master"
|
node_role: "master"
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,9 @@
|
|||||||
# OpenShift node
|
# OpenShift node
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
primary_interface: "enp2s0f0"
|
boot_interface: "enp87s0"
|
||||||
boot_mac_address: "58:47:ca:76:13:49"
|
boot_mac_address: "58:47:ca:76:13:49"
|
||||||
|
primary_interface: "enp2s0f0"
|
||||||
install_mac_address: "58:47:ca:76:13:47"
|
install_mac_address: "58:47:ca:76:13:47"
|
||||||
ip_address: 10.1.71.65
|
ip_address: 10.1.71.65
|
||||||
node_role: "worker"
|
node_role: "worker"
|
||||||
|
|||||||
@@ -54,8 +54,14 @@
|
|||||||
|
|
||||||
vars:
|
vars:
|
||||||
cluster_group: "internal_cluster"
|
cluster_group: "internal_cluster"
|
||||||
|
download_dir: "/var/cache/openshift-install"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Remove previous directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: ~/homelab/terraform/{{ cluster_group }}
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: Create directory
|
- name: Create directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: ~/homelab/terraform/{{ cluster_group }}
|
path: ~/homelab/terraform/{{ cluster_group }}
|
||||||
@@ -77,12 +83,20 @@
|
|||||||
- name: Create directory for OpenShift Installer files
|
- name: Create directory for OpenShift Installer files
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /var/cache/openshift-install/{{ hostvars[groups[cluster_group][0]].cluster_version }}
|
path: "{{ download_dir }}/{{ hostvars[groups[cluster_group][0]].cluster_version }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|
||||||
|
- name: Check if OpenShift installer file exists
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: "{{ download_dir }}/{{ hostvars[groups[cluster_group][0]].cluster_version }}/{{ hostvars[groups[cluster_group][0]].openshift_installer_file }}"
|
||||||
|
register: openshift_installer_file
|
||||||
|
|
||||||
|
- name: Download and install OpenShift installer package
|
||||||
|
when: not openshift_installer_file.stat.exists
|
||||||
|
block:
|
||||||
- name: Download OpenShift Installer file
|
- name: Download OpenShift Installer file
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
@@ -90,13 +104,6 @@
|
|||||||
dest: /var/cache/openshift-install/{{ hostvars[groups[cluster_group][0]].cluster_version }}
|
dest: /var/cache/openshift-install/{{ hostvars[groups[cluster_group][0]].cluster_version }}
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
- name: Download OpenShift Client file
|
|
||||||
become: true
|
|
||||||
ansible.builtin.get_url:
|
|
||||||
url: "{{ hostvars[groups[cluster_group][0]].openshift_client_download_url }}"
|
|
||||||
dest: /var/cache/openshift-install/{{ hostvars[groups[cluster_group][0]].cluster_version }}
|
|
||||||
mode: '0644'
|
|
||||||
|
|
||||||
- name: Unarchive installer file
|
- name: Unarchive installer file
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.unarchive:
|
ansible.builtin.unarchive:
|
||||||
@@ -104,13 +111,6 @@
|
|||||||
dest: /var/cache/openshift-install/{{ hostvars[groups[cluster_group][0]].cluster_version }}
|
dest: /var/cache/openshift-install/{{ hostvars[groups[cluster_group][0]].cluster_version }}
|
||||||
remote_src: true
|
remote_src: true
|
||||||
|
|
||||||
- name: Unarchive client file
|
|
||||||
become: true
|
|
||||||
ansible.builtin.unarchive:
|
|
||||||
src: /var/cache/openshift-install/{{ hostvars[groups[cluster_group][0]].cluster_version }}/openshift-client-linux.tar.gz
|
|
||||||
dest: /var/cache/openshift-install/{{ hostvars[groups[cluster_group][0]].cluster_version }}
|
|
||||||
remote_src: true
|
|
||||||
|
|
||||||
- name: Copy install binary
|
- name: Copy install binary
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
@@ -121,6 +121,28 @@
|
|||||||
group: wed
|
group: wed
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: Check if OpenShift client file exists
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: "{{ download_dir }}/{{ hostvars[groups[cluster_group][0]].cluster_version }}/{{ hostvars[groups[cluster_group][0]].openshift_client_file }}"
|
||||||
|
register: openshift_client_file
|
||||||
|
|
||||||
|
- name: Download and install OpenShift client package
|
||||||
|
when: not openshift_client_file.stat.exists
|
||||||
|
block:
|
||||||
|
- name: Download OpenShift Client file
|
||||||
|
become: true
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "{{ hostvars[groups[cluster_group][0]].openshift_client_download_url }}"
|
||||||
|
dest: /var/cache/openshift-install/{{ hostvars[groups[cluster_group][0]].cluster_version }}
|
||||||
|
mode: '0644'
|
||||||
|
|
||||||
|
- name: Unarchive client file
|
||||||
|
become: true
|
||||||
|
ansible.builtin.unarchive:
|
||||||
|
src: /var/cache/openshift-install/{{ hostvars[groups[cluster_group][0]].cluster_version }}/openshift-client-linux.tar.gz
|
||||||
|
dest: /var/cache/openshift-install/{{ hostvars[groups[cluster_group][0]].cluster_version }}
|
||||||
|
remote_src: true
|
||||||
|
|
||||||
- name: Copy client binary
|
- name: Copy client binary
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
|||||||
@@ -21,6 +21,11 @@ hosts:
|
|||||||
ipv4:
|
ipv4:
|
||||||
enabled: true
|
enabled: true
|
||||||
dhcp: true
|
dhcp: true
|
||||||
|
- name: {{ hostvars[host].boot_interface }}
|
||||||
|
type: ethernet
|
||||||
|
state: down
|
||||||
|
identifier: mac-address
|
||||||
|
mac-address: {{ hostvars[host].boot_mac_address }}
|
||||||
dns-resolver:
|
dns-resolver:
|
||||||
config:
|
config:
|
||||||
server:
|
server:
|
||||||
|
|||||||
Reference in New Issue
Block a user