Bug fix: don't force rc=0 on first command 03/67303/3
authorManuel Buil <mbuil@suse.com>
Tue, 19 Mar 2019 15:10:53 +0000 (16:10 +0100)
committerManuel Buil <mbuil@suse.com>
Mon, 25 Mar 2019 13:33:09 +0000 (13:33 +0000)
commit49c5a0c6c23b107137540616a6342058432aeb3f
treec485efefc929f59cc78009422f7434c4c8126b89
parent4993f06aadf49169cb7fc9917ba475c3d015a9ab
Bug fix: don't force rc=0 on first command

When working with an interface that uses vlan, the vlan is created when
executing the ifup command. As we previously execute the command:

/sbin/ip addr flush dev {{ item }}

it will not return code 0 because the interface does not exist yet.
Consequently, the second part of the command (ifup) is never executed
and the new network config is never triggered.

This patch removes the requirement to get a rc=0 in the first command to
run the second one.

Note that /sbin/ip addr flush dev {{ item }} must be run before ifup
when working with non-vlan interfaces that already have an ip, otherwise
ifup fails in Ubuntu

Change-Id: Ieac273a49b78104f24d4c1ba81c263b450a40a9f
Signed-off-by: Manuel Buil <mbuil@suse.com>
xci/playbooks/roles/bootstrap-host/tasks/network_debian.yml