diff options
author | 2018-03-28 16:10:28 +0100 | |
---|---|---|
committer | 2018-03-28 22:05:21 +0100 | |
commit | 396ea65c98f71580a2e789c7d93c8d8611878b64 (patch) | |
tree | 9ec5127a61b523deb058fa982d61b251b747c02c /xci/playbooks/roles/bootstrap-host/handlers/main.yml | |
parent | 25ec0a542c5948b4ec515138ddb339fa12234a4b (diff) |
xci: bootstrap-host: Make active network interface consistent
When we run XCI for the first time, Ansible picks the first active
interface as the default one. However, after we configure all the XCI
bridges etc, and we try to run this role again, Ansible may have changed
its mind about what interface is active and it could default to one of
the bridges. This forces the role to redo the network configuration but
this time the bridges are being attached to bridges so everything goes
terribly wrong after that. The way to solve this would be to add a local
fact about what interface should be considered as the 'real' default one
so subsequent calls to this role to not destroy the network.
This also drops the task which removed the network configuration files
on SUSE platforms since Ansible is smart enough to not touch them if
they are configured properly.
Change-Id: Ic0525e934b1934a40d69e6cf977615ab9b3dac6d
Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/playbooks/roles/bootstrap-host/handlers/main.yml')
-rw-r--r-- | xci/playbooks/roles/bootstrap-host/handlers/main.yml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xci/playbooks/roles/bootstrap-host/handlers/main.yml b/xci/playbooks/roles/bootstrap-host/handlers/main.yml new file mode 100644 index 00000000..b9103233 --- /dev/null +++ b/xci/playbooks/roles/bootstrap-host/handlers/main.yml @@ -0,0 +1,12 @@ +--- +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 SUSE Linux GmbH and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +- name: Reload facts + setup: + filter: ansible_local |