Category "yaml"

How to update YAML file without loss of comments and formatting / YAML automatic refactoring in Python

I would like to update YAML file values in Python without losing formatting and comments in Python. For example I would like to tranform YAML file value: 456

How to validate openapi 3.0.0 yaml spec?

I have a yaml specification that has been updated from swagger 2.0 to openapi 3.0.0. The file itself is about 7,000 lines so it is challenging to validate by h

Preserving quotes in ruamel.yaml

I'm using ruamel.yaml for modifying a YAML file. My requirement is to add a value for an existing key, preserving everything else including the order. I got it

How to have multiple object types in a single openshift yaml template?

Here is the sample template for single PersistentVolumeClaim with name : claim1 apiVersion: "v1" kind: "PersistentVolumeClaim" metadata: name: "claim1" spec:

Adding time stamp to Kubernetes deployment with latest tag

I am trying to implement Kubernetes resource deployment. For this I created deployment.yaml and service.yaml as my Kubernetes reources. And refering the dockerh

How can I parse a YAML file from a Linux shell script?

I wish to provide a structured configuration file which is as easy as possible for a non-technical user to edit (unfortunately it has to be a file) and so I wan

In docker-compose, is it possible to reuse volume configuration between services?

I'm trying using a setup similar to the following: version: '3.4' x-my-volumes: &volumes - '../src:/var/www/src/:cached' - '../static:/var/www/stat

YAML indentation for array in hash

I think indentation is important in YAML. I tested the following in irb: > puts({1=>[1,2,3]}.to_yaml) --- 1: - 1 - 2 - 3 => nil I expected some

How to fix "mapping values are not allowed in this context " error in yaml file?

I've browsed similar questions and believe i've applied all that i've been able to glean from answers. I have a .yml file where as far as I can tell each eleme