From 7d72cc44caeb9c35389fa8d3e7fb35851b594371 Mon Sep 17 00:00:00 2001 From: Bohdan Dobrelia Date: Wed, 4 Mar 2026 13:09:30 +0100 Subject: [PATCH] [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 --- docs/dictionary/en-custom.txt | 1 + roles/devscripts/README.md | 3 +++ roles/devscripts/defaults/main.yml | 2 ++ roles/devscripts/templates/nmstate.j2 | 4 ++-- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/dictionary/en-custom.txt b/docs/dictionary/en-custom.txt index be0f30440..b24f755d1 100644 --- a/docs/dictionary/en-custom.txt +++ b/docs/dictionary/en-custom.txt @@ -524,6 +524,7 @@ rpmss rsa rsync runtime +RHCOS scansettingbinding scap scp diff --git a/roles/devscripts/README.md b/roles/devscripts/README.md index 85e55bf8f..76eafe173 100644 --- a/roles/devscripts/README.md +++ b/roles/devscripts/README.md @@ -50,6 +50,9 @@ networks. * `cifmw_devscripts_external_net` (dict) Key/value pair containing information about the network infrastructure. Refer [section](#supported-keys-in-cifmw_devscripts_external_net). +* `cifmw_devscripts_ext_iface` (str) The network interface name used in the + NMState static IP template for OCP nodes. Defaults to `enp2s0`. Override for + bare metal hosts whose RHCOS interface name differs (e.g. `eno12399`). * `cifmw_devscripts_cinder_volume_pvs` (list) a list of physical disks to be used for creating cinder-volumes volume-group. By default, the list contains `/dev/vda`. diff --git a/roles/devscripts/defaults/main.yml b/roles/devscripts/defaults/main.yml index 53f35a8fb..effcccdf4 100644 --- a/roles/devscripts/defaults/main.yml +++ b/roles/devscripts/defaults/main.yml @@ -68,6 +68,8 @@ cifmw_devscripts_create_logical_volume: false cifmw_devscripts_cinder_volume_pvs: - /dev/vda +cifmw_devscripts_ext_iface: "enp2s0" + cifmw_devscripts_config_overrides: {} cifmw_devscripts_installer_timeout: 7200 # 2 hours cifmw_devscripts_etcd_slow_profile: true diff --git a/roles/devscripts/templates/nmstate.j2 b/roles/devscripts/templates/nmstate.j2 index e84640afe..b6001a2fb 100644 --- a/roles/devscripts/templates/nmstate.j2 +++ b/roles/devscripts/templates/nmstate.j2 @@ -1,6 +1,6 @@ networkConfig: interfaces: - - name: enp2s0 + - name: {{ cifmw_devscripts_ext_iface }} type: ethernet state: up {% if cifmw_devscripts_config.ip_stack != 'v6' %} @@ -25,4 +25,4 @@ networkConfig: config: - destination: 0.0.0.0/0 next-hop-address: "{{ net_gateway }}" - next-hop-interface: enp2s0 + next-hop-interface: {{ cifmw_devscripts_ext_iface }}