Describe the bug
Hello everybody, I am trying to configure a Ubuntu machine as a switch. For that purpose, I want to use Ansible with this role.
From the documentation, I understand that I have to place my changes underneath the netplan_configuration node.
Every setting underneath the ethernets node is applied successfully, however, no setting underneath the bridges node is applied.
To Reproduce
Steps to reproduce the behavior:
Create a playbook that configures settings both in the ethernets and bridges node
Execute playbook
Validate on the target host that the bridges node is empty
Error due to missing settings
Expected behavior
The bridges node should be added to the configuration just as the ethernet node.
Playbook in Question
Below is the playbook that I tried to run.
---
- hosts: switches
any_errors_fatal: true
vars:
ip_mapping:
coreswitch: "10.2.0.3/24"
second-switch: "10.2.0.4/24"
roles:
- role: mrlesmithjr.netplan
become: true
# This role will do nothing unless netplan_enabled is true.
netplan_enabled: true
netplan_apply: true
# This should point to an existing netplan configuration file
# on your system which this role will overwrite,
# or to a nonexistent file which netplan is aware of.
#
# The default is /etc/netplan/config.yaml.
netplan_config_file: /etc/netplan/50-cloud-init.yaml
# Ubuntu 18.04, for example, defaults to using networkd.
netplan_renderer: networkd
# Simple network configuration to add a single network interface.
# Configuration defined bellow will be written to the file defined
# above in `netplan_config_file`.
netplan_configuration:
version: 2
network:
ethernets:
enp10s0:
match:
macaddress: 00:30:18:0a:c0:ac
mtu: 1500
optional: true
set-name: enp10s0
enp11s0:
match:
macaddress: 00:30:18:0a:c0:ad
mtu: 1500
optional: true
set-name: enp11s0
enp12s0:
match:
macaddress: 00:30:18:0a:c0:ae
mtu: 1500
optional: true
set-name: enp12s0
enp13s0:
match:
macaddress: 00:30:18:0a:c0:af
mtu: 1500
optional: true
set-name: enp13s0
enp16s0:
match:
macaddress: 00:30:18:0a:c0:a4
mtu: 1500
optional: true
set-name: enp16s0
enp17s0:
match:
macaddress: 00:30:18:0a:c0:a5
mtu: 1500
optional: true
set-name: enp17s0
enp18s0:
match:
macaddress: 00:30:18:0a:c0:a6
mtu: 1500
optional: true
set-name: enp18s0
enp19s0:
addresses:
- "{{ ip_mapping[inventory_hostname] }}"
gateway4: 10.2.0.1
match:
macaddress: 00:30:18:0a:c0:a7
mtu: 1500
nameservers:
addresses:
- 10.1.0.1
- 8.8.8.8
search:
- maas
set-name: enp19s0
enp3s0:
match:
macaddress: 00:30:18:04:ad:58
mtu: 1500
optional: true
set-name: enp3s0
enp7s0:
match:
macaddress: 00:30:18:04:ad:59
mtu: 1500
optional: true
set-name: enp7s0
bridges:
switch:
addresses:
- "{{ ip_mapping[inventory_hostname] }}"
gateway4: 10.2.0.1
interfaces:
- enp10s0
- enp11s0
- enp12s0
- enp13s0
- enp16s0
- enp17s0
- enp18s0
- enp19s0
- enp3s0
- enp7s0
System information:
OS: Ubuntu 20.04 (on both the Ansible controller and the target machine)
Additional context
The netplan configuration was carried over from a given configuration that I didn't create, so if there are any settings that don't make sense/contradict each other, please let me know.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug Hello everybody, I am trying to configure a Ubuntu machine as a switch. For that purpose, I want to use Ansible with this role. From the documentation, I understand that I have to place my changes underneath the
netplan_configuration
node. Every setting underneath theethernets
node is applied successfully, however, no setting underneath thebridges
node is applied.To Reproduce Steps to reproduce the behavior:
ethernets
andbridges
nodebridges
node is emptyExpected behavior The
bridges
node should be added to the configuration just as theethernet
node.Playbook in Question
Below is the playbook that I tried to run.
System information:
Additional context The netplan configuration was carried over from a given configuration that I didn't create, so if there are any settings that don't make sense/contradict each other, please let me know.
Feel free to ask more questions if needed.
Thank you in advance, Felix Kuhlmann