fix variables
This commit is contained in:
@@ -16,8 +16,8 @@
|
||||
- name: Add host reservation to dnsmasq
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/dnsmasq.d/hosts.conf
|
||||
regexp: "^dhcp-host={{ mac_address }}"
|
||||
line: "dhcp-host={{ mac_address }},{{ ip_address }} #{{ hostname }}"
|
||||
regexp: "^dhcp-host={{ hostvars['ocp-hub'].mac_address }}"
|
||||
line: "dhcp-host={{ hostvars['ocp-hub'].mac_address }},{{ hostvars['ocp-hub'].ip_address }} #{{ hostvars['ocp-hub'].hostname }}"
|
||||
state: present
|
||||
become: true
|
||||
|
||||
|
||||
@@ -16,11 +16,15 @@
|
||||
- ansible.builtin.include_tasks:
|
||||
file: 02-dhcp/ip-reservations.yml
|
||||
|
||||
- name: Terraform matchbox groups file
|
||||
- name: OpenShift Installer install-config.yaml
|
||||
ansible.builtin.template:
|
||||
src: templates/openshift-installer/install-config.yaml.j2
|
||||
dest: 03-openshift-image/install-config.yaml
|
||||
# include_vars: group_vars/hub
|
||||
|
||||
- name: OpenShift Installer agent-config.yaml
|
||||
ansible.builtin.template:
|
||||
src: templates/openshift-installer/agent-config.yaml.j2
|
||||
dest: 03-openshift-image/agent-config.yaml
|
||||
|
||||
- ansible.builtin.include_tasks:
|
||||
file: 03-openshift-image/create-openshift-image.yml
|
||||
|
||||
@@ -12,8 +12,8 @@ matchbox_rpc_endpoint: "matchbox.int.mk-labs.cloud:8081"
|
||||
openshift_installer_pull_secret: "{{ vault_pull_secret }}"
|
||||
openshift_installer_ssh_key: "{{ vault_ssh_key }}"
|
||||
|
||||
# Variables for 10-sno-hub-cluster
|
||||
hub_cluster_mac_address: "98:b7:85:1e:c6:f1"
|
||||
hub_cluster_ip_address: "10.1.71.10"
|
||||
hub_cluster_hostname: "ocp-hub"
|
||||
hub_cluster_name: "hub"
|
||||
# # Variables for 10-sno-hub-cluster
|
||||
# hub_cluster_mac_address: "98:b7:85:1e:c6:f1"
|
||||
# hub_cluster_ip_address: "10.1.71.10"
|
||||
# hub_cluster_hostname: "ocp-hub"
|
||||
# hub_cluster_name: "hub"
|
||||
|
||||
5
host_vars/ocp-hub/vars
Normal file
5
host_vars/ocp-hub/vars
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
mac_address: "98:b7:85:1e:c6:f1"
|
||||
ip_address: "10.1.71.10"
|
||||
hostname: "ocp-hub"
|
||||
primary_interface: "enp1s0f0"
|
||||
@@ -1,22 +1,22 @@
|
||||
apiVersion: v1alpha1
|
||||
kind: AgentConfig
|
||||
metadata:
|
||||
name: hub
|
||||
rendezvousIP: 10.1.71.10
|
||||
name: {{ group_vars['hub-cluster'].cluster_name }}
|
||||
rendezvousIP: {{ hostvars['ocp-hub'].ip_address }}
|
||||
bootArtifactsBaseURL: https://matchbox.int.mk-labs.cloud:8080/assets/hub/
|
||||
hosts:
|
||||
- hostname: hub
|
||||
- hostname: {{ hostvars['ocp-hub'].hostname }}
|
||||
role: master
|
||||
interfaces:
|
||||
- name: enp1s0f0
|
||||
macAddress: 98:B7:85:1E:C6:F1
|
||||
- name: {{ hostvars['ocp-hub'].primary_interface }}
|
||||
macAddress: {{ hostvars['ocp-hub'].mac_address }}
|
||||
networkConfig:
|
||||
interfaces:
|
||||
- name: enp1s0f0
|
||||
- name: {{ hostvars['ocp-hub'].primary_interface }}
|
||||
type: ethernet
|
||||
state: up
|
||||
identifier: mac-address
|
||||
mac-address: 98:B7:85:1E:C6:F1
|
||||
mac-address: {{ hostvars['ocp-hub'].mac_address }}
|
||||
ipv4:
|
||||
enabled: true
|
||||
dhcp: true
|
||||
@@ -29,5 +29,5 @@ hosts:
|
||||
config:
|
||||
- destination: 0.0.0.0/0
|
||||
next-hop-address: 10.1.71.1
|
||||
next-hop-interface: enp1s0f0
|
||||
next-hop-interface: {{ hostvars['ocp-hub'].primary_interface }}
|
||||
table-id: 254
|
||||
Reference in New Issue
Block a user