dresden-weekly / ansible-network-interfaces

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

removal of old configs #7

Closed starkers closed 8 years ago

starkers commented 8 years ago

Just a suggestion on how to manage interfaces/variables

Currently this role doesn't have a (great) manner to remove the configs.

My suggestion is that for management it could be quite easy like this..

Lets pretend my existing vars are like this:

network_interfaces:

- device: eth0
  description: just a description for humans to understand
  auto: true
  family: inet
  method: static
  address: 192.168.1.11
  netmask: 193.168.1.255
  gateway: 192.168.1.1

- device: eth0:1
  description: aliased NIC
  auto: true
  family: inet
  method: static
  address: 192.168.2.11
  netmask: 193.168.2.255

now.. lets say I want to de-configure eth0:1

What I suggest is:

Simply.. as an admin.. to unconfigure.. you simple yank/cut the eth0:1 stuff under the _enabled array put it under the _disabled array.

I'm honestly not sure if this is the best way so I thought I would open the dialog before showing the crap I hacked up to do this lol :smile:

Also.. I'm in a pub and waiting to watch South Africa play Argentina (rugby) right now so take it all with a pinch of salt.

Side Note

Just throwing ideas out there lol...

Regards -david

arBmind commented 8 years ago

I dont think this is necessary. If you manage your network with this module enable network_manage_devices and only configured files will be there.