Modifying common configuration files with multiple modules
All; I'm an intermediate puppeteer (is that a thing?) looking for some magic tricks. I've come across a specific issue and would like some ideas which would hopefully lead to a more general solution.
I'm working in a greenfield environment and my first step is creating a security module which among many other things installs, enables, and starts SSSD. As you may be aware SSSD requires that an sssd.conf file be created. While this is currently my only module I will surely have many more down the road. One that I can foresee is a module to integrate my Linux machines into AD. This will require modification of sssd.conf as well. How can I create modules which do a specific job while still being generic enough to run alongside other modules? From what I know there are basically (3) ways to create/modify a file from a module. Using a file resource with a static 'source', using a file resource with 'content' from a template, and using Augeas. I think using either a source file or template would be overwriting another modules changes upon every refresh cycle. Augeas seems like the obvious answer but I was hoping for a more elegant solution.