I have a complex yaml document which gets rendered as
interfaces:
- name: phy-1_1_1
description: 'Ansible: cfg phy-1_1_1'
breakout: to-four
- name: phy-1_1_2
description: Interface phy-1_1_2
admin_status: down
- name: phy-1_1_3
description: Interface phy-1_1_3
admin_status: down
...
The output is not very human friendly when the yaml file grows big.
How can we add an empty linebreak after/before each list
blocks i.e. obtain following
interfaces:
- name: phy-1_1_1
description: 'Ansible: cfg phy-1_1_1'
breakout: to-four
- name: phy-1_1_2
description: Interface phy-1_1_2
admin_status: down
- name: phy-1_1_3
description: Interface phy-1_1_3
admin_status: down
...
Inspired from https://github.com/yaml/pyyaml/issues/127
(which addresses a similar problem with toplevel objects), I tried fiddling with yaml dumper class, but could not come up with anything fruitful.