diff --git a/backend_modules/libvirt/host/combustion b/backend_modules/libvirt/host/combustion index 739dc5365..bdd73b062 100644 --- a/backend_modules/libvirt/host/combustion +++ b/backend_modules/libvirt/host/combustion @@ -13,8 +13,7 @@ type=ethernet interface-name=$2 [ipv4] -dhcp-timeout=1 -method=auto +method=$3 [ipv6] addr-gen-mode=eui64 @@ -25,8 +24,8 @@ EOF # Name the Network Manager connections (preparation phase in initrd) if [ "$${1-}" = "--prepare" ]; then - nm_config 1 eth0 - nm_config 2 eth1 + nm_config 1 eth0 auto + nm_config 2 eth1 manual exit 0 fi @@ -34,8 +33,8 @@ fi exec > >(exec tee -a /var/log/combustion) 2>&1 # Name the Network Manager connections (final phase on real filesystem) -nm_config 1 eth0 -nm_config 2 eth1 +nm_config 1 eth0 auto +nm_config 2 eth1 manual # Set linux as password for root echo 'root:$6$3aQC9rrDLHiTf1yR$NoKe9tko0kFIpu0rQ2y/OzOOtbVvs0Amr2bx0T4cGf6aq8PG74EmVy8lSDJdbLVVFpOSzwELWyReRCiPHa7DG0' | chpasswd -e diff --git a/salt/default/network.sls b/salt/default/network.sls index 75f4a6f86..6610c1c54 100644 --- a/salt/default/network.sls +++ b/salt/default/network.sls @@ -20,7 +20,7 @@ ipv6_accept_ra_{{ iface }}: {% endfor %} {% if grains['osfullname'] in ['SLE Micro', 'openSUSE Leap Micro'] and (grains['osrelease'] != '5.1' and grains['osrelease'] != '5.2') %} -{% set conname = salt['cmd.run']('nmcli -g GENERAL.CONNECTION device show eth0') %} +{% set conname = salt.cmd.run_stdout('nmcli -g GENERAL.CONNECTION device show eth0') %} avoid_network_manager_messing_up: cmd.run: - name: | @@ -73,6 +73,17 @@ ipv6_disable_all: {% endif %} +{% if grains['osfullname'] in ['SLE Micro', 'openSUSE Leap Micro'] and (grains['osrelease'] != '5.1' and grains['osrelease'] != '5.2') %} +{% set conname2 = salt.cmd.run_stdout('nmcli -g GENERAL.CONNECTION device show eth1') %} +{% if conname2 != '' %} +enable_dhcp_on_eth1: + cmd.run: + - name: | + nmcli connection modify "{{ conname2 }}" ipv4.method auto + nmcli device modify eth1 ipv4.method auto +{% endif %} +{% endif %} + {% if grains['os_family'] == 'RedHat' and grains.get('osmajorrelease', None)|int() == 6 %} mdns_iptables: iptables.insert: