xci: Networking fixes to introduce role and interface var
[releng.git] / prototypes / xci / playbooks / roles / configure-network / tasks / main.yml
1 ---
2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2017 Ericsson AB and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10 # TODO: this role needs to be adjusted for different distros
11 - name: configure network for {{ ansible_os_family }} on interface {{ interface }}
12   template:
13     src: "{{ src }}"
14     dest: "{{ dest }}"
15 - name: restart ubuntu xenial network service
16   shell: "/sbin/ifconfig {{ interface }} 0 &&/sbin/ifdown -a && /sbin/ifup -a"