Implementing "single-copy nirvana" in cfengine3
·74 words·1 min·
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.
Related
Hierarchical copying with cfengine3
·239 words·2 mins
I recently posted a snippet to perform hierarchical copying in cfengine3. As I was attempting to integrate this mechanism into my copy of cfengine's COPBL, I realized that no additional functions or body components are needed. Thanks to cfengine3's list expansion, all you need to do is include in the existing copy promise the list containing the desired list of suffixes to try. For example:
Limited Time Promotion! 50% off "Learning CFEngine 3"
For one week only, until September 20th, 2017, you can buy the new ebook release of “Learning CFEngine 3” on Amazon at 50% off its list price, US$4.98 instead of the regular US$9.99.
New Release of "Learning CFEngine 3"
A new release of my book “Learning CFEngine 3” is now available!
