Forum: CFEngine Help
Subject: Re: Concatenating multiple files
Author: SteveJake
Link to topic: https://cfengine.com/forum/read.php?3,27049,27062#msg-27062

So, /etc/hosts is just an example file.  We're looking for a mechanism to do 
this for a number of different config files.    Edit_lines promises are great, 
but the only mechanism I could think of for keeping the data separate from the 
promises using edit_lines is to read in the contents of the various files and 
use edit-lines to write them out if needed.  Effective, but not quite as clean 
as what I was hoping to do with concatenation.  

Also, it's not that multiple people are maintaining the files, it's that there 
are multiple classes.  There is a matrix of application, location and 
environment, where a given system is in three different classes based on those 
criteria.  We could create a class for each combination of app, loc and env, 
but then we end up with dozens, if not hundreds of class definitions.  But, if 
we could maintain a file for each app, another for each loc and another for 
each environment and then build our configuration files out of the combination 
of those files, then things become much more manageable.  Does that make sense?

thanks!

-steve j

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to