Using environment variables in Cfengine 3

Every Cfengine 2 script of my company contains environment variables. They are essential for configuring most of the services running on the different servers. For porting those scripts to Cfengine 3 one day I wanted to know how to make use of environment variables in the latest version of the configuration management tool. Well, the […]... Read More

Simple reporting with Cfengine 3

Keeping yourself up to date about what is happening on your Linux systems can be quite time-consuming. Many sys admins therefore use a little trick: Since the most important logs contain all the informative stuff, many admins install logcheck which reports unusual happenings every 60 minutes via mail. In this way, the admins stay informed […]... Read More

Configuring SSHd (or any other service) with Cfengine 3

Today I had more time to have a closer look at Cfengine 3. Since I am still using Cfengine 2 at work due to a company policy, I would like to gain more knowledge about the latest version of the configuration management tool in my spare time. One day I am hopefully able to port […]... Read More

Running shell commands with Cfengine 3

Although it is a very bad idea to directly run shell commands with Cfengine 3 (see here why), there might be a few situations where this is still the best attempt, e.g. when performing custom maintenance work which really can not be done by Cfengine 3. Writing the Cfengine 3 code body common control { […]... Read More

Managing APT sources.lists with Cfengine 3

In one of my previous blog posts I wrote about a very simple package management solution with Cfengine 3. Of course installing new packages is only one tiny part of really “managing” packages. But even this little step could fail if the according sources.list file is not correct. So todays’s part of the Cfengine 3 […]... Read More
sdiff example output in less

Tools for Linux sysadmins #3: sdiff

Many Linux sysadmins have in common that working with configuration and other text files is part of their daily work. In my case, I often migrate older Linux boxes to our own Ubuntu fork. Therefore it is required to also use old configurations where it makes sense. When configuring and testing the applications on the […]... Read More

Tools for Linux sysadmins #2: hwinfo, lspci and more

Ever needed to find out what hardware runs a specific server without knowing anything about this system? Well, this happens to me from time to time. But since we are Linux sysadmins we know that there are possibilities to find out what we are dealing with. Let’s assume you are currently in such a situation […]... Read More

Mounting NFS-Shares with Cfengine 3

One often used service is NFS. The ability of mounting a file system over the network is very handy and even I use it regularly in my projects. Now imagine a scenario where you manage the configuration of your servers with Cfengine 3 and you have a central file server with NFS running on it. […]... Read More

Installing packages with Cfengine 3

For some strange reason I still have the motivation to look at the “new” Cfengine 3. While I covered editing files and checking for running services in the last posts, I will try to do some very basic package management with Cfengine 3 today. Writing the script body common control { version => "1.0"; inputs […]... Read More

Cfengine3: Check for running services

In the last post about Cfengine 3 we talked about a simple script which creates a file and writes something into it. Today, we will create a simple example script which checks if two specified services are running. Writing the script Connect to your Linux box and create the following file: /var/lib/cfengine3/inputs/example2.cf body common control […]... Read More