Location of CFEngine Inputs on Debian Systems

The first few times I used CFEngine on a Debian GNU/Linux system I ran into strange eror messages while updating the inputs. I used some code examples for update.cf:

    perms => system("600"),
    copy_from => mycopy("$(master_location)","localhost"),
    depth_search => recurse("inf"),
    action => immediate;

See here for the complete example. The only change I made was to adapt the code to the location of the CFEngine system files that are located under /var/lib/cfengine3 on Debian systems. Still, it gave me mysterious errors about recursive security issues.

The error is caused by a small difference in theĀ  file locations on Debian systems: inputs are located in the /etc/cfengine3 directory and /var/lib/cfengine3/inputs is not a directory but a symbolic link to /etc/cfengine3. After I changed line no. 1 in above code to point to the real directory “/etc/cfengine3”, everything started to run smoothly!

Tip: Ubuntu systems are identical to Debian in this respect.


Configuration Management for Amateurs

The configuration of computer systems is a tedious endeavor. It requires installation of software and hours editing configuration files. Often, these tasks have to be repeated for many computers. This can be automated with configuration management software.
Configuration management software is written to control networks of tens if not hundreds or even thousands computers. So why would an amateur who runs only one or two machines want to use it?

In the past, I never used configuration management software. After all, all I wanted was to configure a single webserver. I like playing with server configuration files, after all I am a geek. However, I also have a day job that has nothing to do with system administration and a family. Therefore, even small projects can take a while to complete. Consequently, I forget many things and often fall into the same traps over and over again.

Of course I could take better notes, but automating configuration tasks prevents both repeated errors and serves as documentation at the same time. It also serves as a mind hack: On one hand, I know that documentation is important. On the other hand, coding is much more fun. Figuring out how to configure my system with a configuration management software can also be fun (for geeks).

In addition, even a small-time system administrator like me will end up repeating many things. The availability of cloud computing, for instance, gives many opportunities to play around – but also to spend a lot of time with mundane configuration tasks. Imagine you want to try some new software. Cloud computing gives easy and cheap access to computing resources. However, starting a fresh server instance usually comes together with basic configuration. Especially for geeks. After all, most geeks are not satisfied with the standard choice of text editor etc. Using configuration management software, you can automate these basic tasks. In my case, the resulting time savings can make the difference between a quick one-day project and a never ending on-off affair.