Performing simple Backups with Cfengine 3

Today I noticed that it might be useful to backup some folders on one of my VMs from time to time. At first I thought about creating a new cron job, but then I noticed that Cfengine 3 is running on that VM. So – why not letting Cfengine 3 do all the work? Writing […]... Read More

Managing APT sources.lists with Puppet

For this part of my comparison series “Cfengine 3 vs. Puppet” I upgraded my Linux Mint 12 to 13 and switched to Puppet 3.0.2. If you download and try my little code snippets I recommend to use at least Puppet 2.7.14 since this version is able to run the official apt module from Puppetlabs. While […]... Read More

Setting file permissions and ownerships with Cfengine 3

One of the most common tasks of a Linux sysadmin (or DevOp) might be setting file permissions and ownerships. In this blog I’ll show you how you can do that in a very simple but effective way with Cfengine 3. Writing the Cfengine 3 code for setting file permissions and ownerships body common control { […]... Read More

Add a new user with Cfengine 3

In my last blog post about Cfengine 3 we talked about how Cfengine 3 can check for you if an user exists or not. Today we will have a look at a very simple way of how a new user can be created if it doesn’t already exist. Writing the Cfengine 3 code for creating […]... Read More

Check if an user exists with Cfengine 3

Often there is a need to add new users after deploying a new Linux box. In my case, I often have to add an user which takes care of the monitoring stuff (e.g. owning the Nagios plugins and executing them). The following little Cfengine 3 code snippet should help you to determine if a specific […]... Read More

Creating new symlinks with Cfengine 3

Sometimes it is necessary to create new symlinks. The following code snippet shows you how to do that with Cfengine 3. Please note that there are several ways of achieving our goal, but the following one should be the most efficient one when you only want to set one symlink. Writing the Cfengine 3 code […]... Read More

Monitoring the Apache web server with Cfengine 3

During the last weeks I received a lot of positive feedback on my blog posts and the Cfengine 3 code snippets so I started to post them on Twitter. Especially my little article about monitoring the CPU load with Cfengine 3 gained some attention there, that is why I am very motivated to dive in […]... Read More

Setting ACLs with the community version of Cfengine 3

As you might already know the community version of Cfengine 3 is not able to set ACLs the “Cfengine 3 way”. So when you are using the community edition of Cfengine 3 you have to find another way of doing it.. such as running shell commands out of the Cfengine 3 scripts. I hope the […]... Read More

Deleting old files with Cfengine 3

Cfengine 3 can be used to tidy your systems up on regular basis. Depending on the time, day of the week of the file extensions you are able to define how Cfengine 3 shall delete old and obsolete files. In today’s example a code snippet is shown which deletes all .gz files in /var/log which […]... Read More

Monitoring the CPU load with Cfengine 3

The creators of Cfengine 3 claim that their configuration management tool is able to perform a basic monitoring of important states, such as the CPU load. And indeed, with the help of Cfengine 3 you possibly get rid of some monitoring checks and therefore relive your monitoring system. This is doable because cf-monitord runs in […]... Read More