SaltStack: edit yaml file on minion host based on salt pillar data
<p>Say the minion host has a default yaml configuration named <code>myconf.yaml</code>. What I want to do is to edit parts of those yaml entries using values from a pillar. I can't even begin to think how to do this on Salt. The only think I can think of is to run a custom python script on the host via <code>cmd.run</code> and feed it with input via arguments, but this seems overcomplicated.</p>

<p>I want to avoid <code>file.managed</code>. I cannot use a template, since the <code>.yaml</code> file is big, and can change by external means. I just want to edit a few parameters in it. I suppose a python script could do it but I thought salt could do it without writing s/w</p>

<p>I have found <code>salt.states.file.serialize</code> with the <code>merge_if_exists</code> option, I will try this and report.</p>