dresden-weekly / ansible-network-interfaces

Ansible roles to manage Ubuntu network interface configuration
MIT License
86 stars 62 forks source link

Examples for bridges #1

Closed hvisage closed 8 years ago

hvisage commented 9 years ago

Hi there,

Some examples/documentation for bridges would be appreciated.

Also, do your rolesremove/replace the original eg. eth0 entries in /etc/network/interfaces when you define an eth0 using this role?

arBmind commented 9 years ago

Hi hvisage,

so far I had no use case for bridges. The defaults/main.yml contains all the available options and defaults. If you have a use case, I would be more than happy to make an example out of it.

Yes my role creates a new /etc/network/interfaces that includes a configuration file for each device. That should make it much easier to manage the individual network devices.

starkers commented 8 years ago

Just thinking out loud here but that shouldn't be too hard to add.

step one

step two

step three

network_interfaces:

- device: eth0
  description: bridge 1, NIC A
  auto: true
  family: inet
  method: manual

- device: eth1
  description: bridge 1, NIC B
  auto: true
  family: inet
  method: manual

- device: br0
  description: bridge 1
  auto: true
  method: dhcp
  bridge_ports: "eth0 eth1"

I'm guessing that would result in something like this hopefully:

 iface eth0 inet manual
 iface eth1 inet manual

 iface br0 inet dhcp
  bridge_ports eth0 eth1
arBmind commented 8 years ago

I added this example to the wiki Bridge-Example