Forum: CFEngine Help
Subject: Re: An advanced policy using template and variable substitution
Author: msvob...@linkedin.com
Link to topic: https://cfengine.com/forum/read.php?3,24105,24120#msg-24120

Hey Toddnni

Using the MD5 sum copy from /etc/sysctl.final into /etc/sysctl.conf allows me 
to keep comments in the template that describes the variable.  This lets the 
user understand when looking at /etc/sysctl.conf what the tunable actually 
does.  I think using your approach, everything in the file would be deleted 
except the variables themselves.  

Also, it gives me an easy way of doing

classses => if_repaired on line 309.

Which will raise a class if a difference was detected, therefore allowing me to 
execute the sysctl -p command to read the values from the file and apply them 
to the live system.

Also, in my backup_cp_md5_compare promise, I keep a backup of the previous 
config before I overwrite it.  It allows me to keep a changelog / history of 
the config.  Every time there is a modification, a copy of what was there is 
taken, and the new config is put in place, and when that change happened.

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

Reply via email to