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:
rename the variable from network_interfaces to network_interfaces_enabled
create a task that removes the .cfg files under network_interfaces_disabled
Why
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
I did see the network_existing_files stuff and realised it conflicts with the PR (.cfg) I just submitted.
I'm actually thinking bruteforce "purging" like that may be more elegant for people like me who like things "statefull".. so maybe we should make that only erase .cfg files so we keep backups?
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:
now.. lets say I want to de-configure
eth0:1
What I suggest is:
network_interfaces
tonetwork_interfaces_enabled
network_interfaces_disabled
Why
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
network_existing_files
stuff and realised it conflicts with the PR (.cfg) I just submitted.Just throwing ideas out there lol...
Regards -david