Files
Dmitriy Rabotyagov e4d5d06a6f Symlink the role into tests
Ansible Core 2.19 has a different set of default paths to look for roles
so molecule test is failing now.

Let's create a symlink of the role into the tests repo for the test
playbook to find content of the role easily.

Change-Id: Ie004fe62d37ad704d649a5e71e5ab3776491a521
Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
2026-03-04 13:49:39 +00:00

129 lines
3.4 KiB
YAML

---
# Copyright 2018, Rackspace US, Inc.
# Copyright 2018, Logan Vig <logan2211@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Playbook for role testing
hosts: network_hosts
gather_facts: true
roles:
- role: systemd_networkd
vars:
systemd_networkd_link:
MACAddressPolicy: "persistent"
NamePolicy: "kernel database onboard slot path"
systemd_run_networkd: yes
systemd_resolved:
DNS: "208.67.222.222"
FallbackDNS: "8.8.8.8"
Cache: yes
systemd_netdevs:
- NetDev:
Name: dummy0
Kind: dummy
- NetDev:
Name: dummy1
Kind: dummy
- NetDev:
Name: bond0
Kind: bond
Bond:
Mode: 802.3ad
TransmitHashPolicy: layer3+4
MIIMonitorSec: 1s
LACPTransmitRate: fast
- NetDev:
Name: br-dummy
Kind: bridge
- NetDev:
Name: dummy2
Kind: dummy
- NetDev:
Name: dummy3
Kind: dummy
- NetDev:
Name: br-test
Kind: bridge
- NetDev:
Name: br-test2
Kind: bridge
- NetDev:
Name: vlan-100
Kind: vlan
VLAN:
Id: 100
- NetDev:
Name: vlan-200
Kind: vlan
VLAN:
Id: 200
systemd_networks:
- interface: "dummy0"
bond: "bond0"
mtu: 9000
- interface: "dummy1"
bond: "bond0"
mtu: 9000
- interface: "bond0"
bridge: "br-dummy"
mtu: 9000
- interface: "br-dummy"
address: "10.0.0.100"
netmask: "255.255.255.0"
gateway: "{{ ansible_facts['default_ipv4']['gateway'] | default('10.0.0.1') }}"
mtu: 9000
usedns: true
static_routes:
- gateway: "10.1.0.1"
cidr: "10.1.0.0/24"
- Gateway: "10.1.0.100"
Table: 100
routing_rules:
- From: 192.168.0.0/24
Priority: 900
Table: 100
config_overrides:
Network:
ConfigureWithoutCarrier: true
link_config_overrides:
Link:
Alias: "dummy-bridge0"
- interface: "dummy2"
bridge: "br-test"
- interface: "dummy3"
bridge: "br-test2"
- interface: "br-test"
address: "10.1.0.1"
netmask: "255.255.255.0"
- interface: "br-test2"
address: 10.2.0.1
netmask: "255.255.255.0"
ipforward: true
vlan:
- vlan-100
filename: 6-general-br-test2
- interface: "br-test2"
filename: 6-general-br-test2
network_overrides_only: true
config_overrides:
Network:
VLAN:
? vlan-200
- interface: "vlan-100"
address: 10.3.0.1
netmask: "255.255.255.0"
- interface: "vlan-200"
address: 10.4.0.1
netmask: "255.255.255.0"