I've been reading through the entire thread 1 more time. I get confused because short answers that don't include the question being answered clearly...
I would slurp the specific data from the file, place that into variables, then simply print the desired config out in the required YAML format. bash...
And sorry ... but this failed upgrade triggered my OCD (despite of the deep brain stimulation) ...
And yes, next time I will wait until upgrade gets...