Closed we-CONECT-Joe closed 7 years ago
I'm not sure I understand what this would be used for? Can you explain a bit more?
Generally puppet is used to lay down the config for an application like mysql. We assume that puppet is managing everything and this is getting installed on a fresh machine. What info would we need from existing config and how would that info get placed in the config?
puppet is not only used to setup machines but also to keep them configured like that. (this is what we do here).
Think of it as an "advanced" ensure.
Imagine a scenario where you want to make sure that all nodes of the cluster do now require the innodb_buffer_pool_size has to be increased because the production database got bigger. Now you could just write directly to each conf and restart the servers, but it would be simpler to just change my puppet scripts.
Once my puppet script is commited to master git, i use a hook to run the manfiest directly on the cluster. i know know this technically should be a seperate gem, but i see the benefit here as well.
if that is to much iam thinking about using the script to create the full template of my.cnf with defaults. but thats not as cool =)
I'm not sure I understand how parsing the config file with ruby helps here. Puppet just needs to write to config files. What does it need to parse and read them for?
Something like Augeas perhaps?
well i was thinking of it along the lines of an ensure for config files but yeah i guess its a not a real problem that needs solving.
like this: https://gist.github.com/gmcmillan/2304284
basically the syntax for everything should come down to:
What do you think? i mean yes, one could just create his own config and apply that, but where is the fun in that?