Author Archives: Nick Anderson

I am so excited! And I just cant hide it!

Today I start a new jour­ney with some of the smartest peo­ple on the planet. I have accepted a posi­tion with CFEngine. Pri­mar­ily I will be assist­ing cus­tomers with the eval­u­a­tion, design, imple­men­ta­tion and pol­icy writ­ing. If you know me from the CFEngine com­mu­nity, don’t worry I only plan to increase my activ­ity and con­tinue

Canonifying a list with CFEngine 3

John Sanders shared a pat­tern for canon­i­fy­ing lists in #CFEngine on irc.freenode.net yes­ter­day. It’s a use­ful ref­er­ence so I thought I would repli­cate it here.   In lines 9–12 of the exam­ple pol­icy we build an array with val­ues that need to be canon­i­fied. We use getindices to get the list of the first index. You

Working around getindices with dynamically generated arrays in CFEngine 3

There is a known bug where getindices is unable to get the index of a dynam­i­cally gen­er­ated array until the next pass. This comes up from time to time so I thought I would post an exam­ple using a pat­tern shared on the CFEngine help mail­ing list. The pol­icy below shows 3 work­ing exam­ples. They

Deep thoughts

bun­dle com­mon knowledge(status) {   vars:     “soft­ware” string => “$(sta­tus)”, pol­icy => “free”;     !isUs­able::       “soft­ware” string => “usable”, pol­icy => “free”;     isUs­able::       “soft­ware” string => “reusable”, pol­icy => “free”;   classes:     “isUs­able” expres­sion => regcmp(“$(software)”, “usable”);     “reUsable” expres­sion => regcmp(“$(software)”, “resuable”);   reports:       Morning|Afternoon|Evening|Night::         “Before soft­ware

CFEngine 3.4.2 Changelog for Breakfast

Changel­ogs are just as impor­tant as the most impor­tant meal of the day. OK so I don’t always eat break­fast, but I do make an effort to read changel­ogs. CFEngine 3.4.2 was released today. What I found inter­est­ing was that the default mas­ter­files pol­icy has been updated. body execu­tor con­trol now calls $(sys.workdir)/inputs/update.cf instead of