Skip to content

Commit 6a339e4

Browse files
bogdandoopenshift-merge-bot[bot]
authored andcommitted
[devscripts] Parametrize devscripts's ext_iface
Replace the hardcoded value with a variable. This value may need changes for SNO BM cases. Signed-off-by: Bohdan Dobrelia <bdobreli@redhat.com>
1 parent 70f4bb9 commit 6a339e4

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

docs/dictionary/en-custom.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ rpmss
524524
rsa
525525
rsync
526526
runtime
527+
RHCOS
527528
scansettingbinding
528529
scap
529530
scp

roles/devscripts/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ networks.
5050
* `cifmw_devscripts_external_net` (dict) Key/value pair containing information
5151
about the network infrastructure.
5252
Refer [section](#supported-keys-in-cifmw_devscripts_external_net).
53+
* `cifmw_devscripts_ext_iface` (str) The network interface name used in the
54+
NMState static IP template for OCP nodes. Defaults to `enp2s0`. Override for
55+
bare metal hosts whose RHCOS interface name differs (e.g. `eno12399`).
5356
* `cifmw_devscripts_cinder_volume_pvs` (list) a list of physical disks to be
5457
used for creating cinder-volumes volume-group. By default, the list contains
5558
`/dev/vda`.

roles/devscripts/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ cifmw_devscripts_create_logical_volume: false
6868
cifmw_devscripts_cinder_volume_pvs:
6969
- /dev/vda
7070

71+
cifmw_devscripts_ext_iface: "enp2s0"
72+
7173
cifmw_devscripts_config_overrides: {}
7274
cifmw_devscripts_installer_timeout: 7200 # 2 hours
7375
cifmw_devscripts_etcd_slow_profile: true

roles/devscripts/templates/nmstate.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
networkConfig:
22
interfaces:
3-
- name: enp2s0
3+
- name: {{ cifmw_devscripts_ext_iface }}
44
type: ethernet
55
state: up
66
{% if cifmw_devscripts_config.ip_stack != 'v6' %}
@@ -25,4 +25,4 @@ networkConfig:
2525
config:
2626
- destination: 0.0.0.0/0
2727
next-hop-address: "{{ net_gateway }}"
28-
next-hop-interface: enp2s0
28+
next-hop-interface: {{ cifmw_devscripts_ext_iface }}

0 commit comments

Comments
 (0)