YAML format for configs
Posted: 10 May 2022, 20:31
Given ini's lack of multiline support, I have found it inconvenient to work with long parameters, specifically, 'managed_bookmarks' and 'homepage', which always span multiple pages in width while simultaneously being quite finicky about their syntax (especially the bookmarks).
I was wondering if the team would be open to a more robust format with mapping, such as YAML. See below a sample config converted to YAML format (sanitized and greatly reduced for size. also note that the highlighting is wonky here):
The biggest structural change would be an additional collection layer for clients (you could also use separate documents with `---`). I'm guessing type concerns could be an issue as well. That said, I really think this would make config management easier, particularly in the case of managed_bookmarks (look at how nice that is!).
Not at all suggesting that this is a simple or quick change, or even one that I would call "important". However, I feel that this change would be a good investment for the team because:
I was wondering if the team would be open to a more robust format with mapping, such as YAML. See below a sample config converted to YAML format (sanitized and greatly reduced for size. also note that the highlighting is wonky here):
Code: Select all
GLOBAL:
kiosk_config: https://yourdomainhere/your-config.txt
managed_bookmarks:
Your_Homepage: https://yourdomainhere.org
Your_Story: https://yourdomainhere.org/story
Your_Login: https://yourdomainhere.org/login
enable_file_protocol: yes
homepage:
- https://yourdomainhere.org
- https://yourdomainhere.org/story
- https://yourdomainhere.org/login
allow_icmp_protocol: yes
slide_duration: 90
root_password: This-Is-A-Password-Example
additional_components:
- uefi.zip
- fonts.zip
CLIENTS:
- PCID: CC-44-B8-54-20-43 # Client under the stairs and around the corner
ip_address: 192.168.1.1
- PCID: E5-8B-8A-A9-9E-64 # Client currently on Mars
ip_address: 192.168.1.2
Not at all suggesting that this is a simple or quick change, or even one that I would call "important". However, I feel that this change would be a good investment for the team because:
- It is more easily read and edited by humans (particularly with syntax highlighting)
- It has extensive cross-language support similar to JSON, meaning config files could be generated via script from a multitude of environments.
- Its mapping support matching native data structures allows more flexibility in development.