The introduction of key_mangling=('-', '_') when working with get_config_dict() caused more harm then good.
The main reason here is that Jinja2 does not support working with the . operator on a dictionary key which contains a hyphen.
Imagine a dictionary:
{'area': {'0': {'network': ['172.18.201.0/24', '172.18.254.201/32']}, 'area-type': {}}, 'auto-cost': {'reference-bandwidth': '100'}, 'interface': {'eth0': {'authentication': {'md5': {'key-id': {'10': {'md5-key': 'vyos'}}}}, 'dead-interval': '40', 'hello-interval': '10', 'priority': '1', 'retransmit-interval': '5', 'transmit-delay': '1', 'log-adjacency-changes': {'detail': {}}, 'parameters': {'abr-type': 'cisco', 'router-id': '172.18.254.201'}, 'passive-interface': ['default'], 'passive-interface-exclude': ['eth0.201'], 'redistribute': {}, 'timers': {'throttle': {'spf': {'delay': '200', 'initial-holdtime': '1000', 'max-holdtime': '10000'}}}}
In Jinja2 you can access key like: {{ interface.eth0.priority }} which will give you 1, but you can not use this syntax (.) when accessing keys containing a hyphen, you instead must use: {{ interface.eth0['dead-interval'] }}
Worth noticing: https://blog.networktocode.com/post/Exploring-Jinja-Variable-Syntax-in-Ansible/
Also mentioned here: https://forum.vyos.io/t/vyos-1-4-set-protocols-ospf-route-map-ospf-in-broken/6906/6