1 # SPDX-license-identifier: Apache-2.0
2 ##############################################################################
3 # Copyright (c) 2018 Ericsson AB and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
10 - name: install OSM required packages
12 name: "{{ osm_required_packages[ansible_pkg_mgr] }}"
15 - name: initialize LXD
20 - name: stop lxd-bridge service
25 - name: create lxd-bridge configuration
28 dest: /etc/default/lxd-bridge
31 - name: ensure dnsmasq service is stopped before attempting to start lxd-bridge
36 - name: ensure dnsmasq uses interface br-vlan for lxd-bridge
38 path: /etc/dnsmasq.conf
40 line: 'interface=br-vlan'
42 - name: ensure docker and lxd-bridge services are started and enabled
51 - name: get default interface
52 shell: route -n | awk '$1~/^0.0.0.0/ {print $8}'
53 register: default_interface
57 - name: get mtu of the default interface {{ default_interface.stdout }}
58 shell: ip addr show {{ default_interface.stdout }} | perl -ne 'if (/mtu\s(\d+)/) {print $1;}'
59 register: default_interface_mtu
63 - name: set lxdbr0 mtu to {{ default_interface_mtu.stdout }}
64 command: ifconfig lxdbr0 mtu {{ default_interface_mtu.stdout }}
68 - name: add devuser to lxd and docker groups