metal-stack / metal-roles

Ansible roles for deploying metal-stack
MIT License
3 stars 2 forks source link

Check if INTERFACE needs to be added to config_db in SONiC role #348

Closed iljarotar closed 6 days ago

iljarotar commented 1 week ago

The template for the config_db.json currently has the problem of potentially adding INTERFACE: null to the config_db, which ruins all interface configuration. Unfortunately the scoping of jinja2 variables makes it impossible to change a variable value inside of a scope and access the updated value from a different scope (See docs). So I ended up using these complicated chains of filters. Better ideas are welcome.

robertvolkmann commented 1 week ago

@iljarotar please add a test for this case.

iljarotar commented 6 days ago

This template is too complicated and error prone. Will try to solve it differently.