Defaults
With defaults it is possible to configure implicit default settings for interfaces. The match: option is a filter to select on which interfaces the defaults should be applied. Only the defaults of the first match are applied. There are several clear_… settings which allows to clear interface settings (addresses, fdb, …).
parameters:
defaults:
# list of defaults settings
- match:
# regex matching on interface name
- ifname: '^HA$'
# remove any ip addresses if an interface has no `addresses:` setting
clear_addresses: true
# add some implicit link settings
link:
state: down
ifalias: ''
There is also an implicit builtin defaults_builtin setting which clears settings not specified in the interfaces settings:
parameters:
defaults_builtin:
- match:
- ifname: ''
clear_addresses: true
clear_fdb: true
clear_neighbours: true
clear_tc: true
link:
state: down
master: null
Breaking Change
The implicit cleanup since ifstate 2.0 differse from the behavoir of ifstate 1.x, where unspecified settings were just ignored.
These built-in entries can be viewed with the ìfstatecli showall action.