Forum: Cfengine Help
Subject: Template copy, edit, then expand
Author: bbomgardner
Link to topic: https://cfengine.com/forum/read.php?3,19765,19765#msg-19765

I have a need to make an edit to a certain global template for a particular 
group of hosts.  This is causing me to change my initial template design but I 
still wanted to post this question:  What is a good way to accomplish 
convergence with templates and edit_lines?

For example, if I edit the template file before it is expanded during the next 
cf-agent run, the process repeats as the unexpanded template file no longer 
matches the master copy:

1.  Template is copied to a temp directory
2.  Template is edited with some host-level changes
3.  Template gets expanded into the config file

In contrast, if the config file is edited after the template has been expanded 
then the expansion process will overwrite the edited file in the next run:

1.  Template is copied to a temp directory
2.  Template gets expanded into the config file
3.  Config file is edited with some host-level changes

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

Reply via email to