From a3f2af5a8cae51b28ec58eccfc43a6beaccb1827 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 14 Dec 2018 19:05:20 -0800 Subject: [PATCH] openqa: tweak qa01 ethernet config stuff a bit Also, allow interface names starting with 'em' in the base network stuff. Signed-off-by: Adam Williamson --- inventory/host_vars/qa01.qa.fedoraproject.org | 8 +++++--- roles/base/tasks/main.yml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/inventory/host_vars/qa01.qa.fedoraproject.org b/inventory/host_vars/qa01.qa.fedoraproject.org index c372139fe3..5f0c06530c 100644 --- a/inventory/host_vars/qa01.qa.fedoraproject.org +++ b/inventory/host_vars/qa01.qa.fedoraproject.org @@ -11,9 +11,11 @@ gw: 10.5.124.254 # openQA tap worker hosts (like this one) do stuff with ifcfg that base # doesn't understand. terrible, terrible stuff. seriously - it doesn't # handle the openvswitch config well. so let's tell it to just configure -# the actual connected interface (which on this system is eth0) for us -# and leave everything else alone. -ansible_ifcfg_whitelist: ['em3'] +# the regular interfaces (which on this system is em1-4) for us, +# disabling all but the one we want to use (em3), and leave everything +# else alone. +ansible_ifcfg_whitelist: ['em1', 'em2', 'em3', 'em4'] +ansible_ifcfg_disabled: ['em1', 'em2', 'em4'] # this is a powerful machine, can handle more openQA workers openqa_workers: 30 diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index 31975c4086..de603feb9a 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -79,7 +79,7 @@ # - restart NetworkManager - reload NetworkManager-connections - apply interface-changes - when: (virthost is not defined) and (item.startswith(('eth','br','enc'))) and (hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['type'] == 'ether') and (ansible_distribution_major_version|int >=7) and hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['active'] and nmclitest is success and ( not ansible_ifcfg_blacklist ) and ( ansible_ifcfg_whitelist is not defined or item in ansible_ifcfg_whitelist ) + when: (virthost is not defined) and (item.startswith(('eth','br','enc','em'))) and (hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['type'] == 'ether') and (ansible_distribution_major_version|int >=7) and hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['active'] and nmclitest is success and ( not ansible_ifcfg_blacklist ) and ( ansible_ifcfg_whitelist is not defined or item in ansible_ifcfg_whitelist ) tags: - config - ifcfg