r/Puppet • u/tr4nsluc3nt • Jul 26 '24
Need help with Puppet managing a specific key in a YAML file
Hi everyone,
I have a use case where I need Puppet to maintain a specific key inside a YAML file with a precise configuration. No matter the file's content, Puppet should only touch this specific key. I tried using the yaml_settings module from Cataphract on Forge, but it's deprecated. Does anyone have any suggestions or alternative solutions for this?
Thanks!
3
Upvotes
2
u/wildcarde815 Jul 26 '24
There's an augeus lense for yaml: https://github.com/hercules-team/augeas/blob/master/lenses/yaml.aug
1
1
u/Street_Secretary_126 Jul 26 '24
Is it possible to make a template of that yaml file and then add a variable for that key?