zzamboni.org

Implementing "Single-copy Nirvana" in Cfengine3

Here is a sample implementation in cfengine3 of the technique described in the cfengine wiki as ”Singlecopy Nirvana” for cfengine2. Cfengine3 makes the technique more powerful by allowing modularization, so that you can specify both the suffixes to try, and the files to copy using those suffixes, as variables. Also, cf3’s automatic list expansion allows us to write a single copy statement that will be automatically expanded into all the different values to try.