I have a specific variable structure that I want to get from the repository to the yaml file on my hosts.
Let's assume this structure:
secrets: psp1: username: this password: that secret_key: 123 ...
I need something like a โgenericโ pattern to output any โsecretsโ at the moment, as the content changes almost entirely based on the current environment.
The easiest solution I can think of is to display the entire structure in the template as follows:
But the jinja2 to_yaml filter only performs โyamlifyโ at the first level, deeper attachments are output in json.
Can I somehow work around this problem? Is there an easier way to achieve what I want?
Thanks for any help!
user4653842
source share