spurin / diveintoansible-lab

Dive Into Ansible Lab
775 stars 494 forks source link

Added canonical name to bridge interface #92

Closed Ardillo closed 2 years ago

Ardillo commented 2 years ago

This change will name the bridge interface 'diveinto.io'. This allows for easy recognizing the interface using the 'ip' command.

Furthermore, this change will allow binding a host DNS server to the interface name in a more robust way. Personally using dnsmasq as a local DNS forwarder. Example dnsmasq config:

..
interface=lo,docker0,diveinto.io
no-dhcp-interface=lo,docker0,diveinto.io
bind-interfaces
..
spurin commented 2 years ago

Wow! This is super cool. Thanks @Ardillo.

Didn't know you could do this.

Have spent some time making sure that the lab works across all variants including WSL subsystems so I'm going to need to thoroughly test this before I fully accept the merge as is.

It is however, really appreciated! If for now you wanted to change the current merge request so that it's an informative commented block, I'd happily merge this in the interim whilst it's tested.

Ardillo commented 2 years ago

You're welcome.

I haven't tested it on WSL, so good point. Just commented the code.