Skip to content

Linux hostid and endianness

The hostid is often used to provide a host identification for a software license. I wanted to use Puppet to deploy a configuration file containing the hostid for a number of Linux hosts. Normally you would write a custom fact to call the hostid command on the host and use the returned value in your Puppet manifest. But I wanted to avoid forking another process, so here is my non-forking implementation.

Continue reading "Linux hostid and endianness"

Manage /etc/gai.conf with Puppet

RFC 3484 describes an algorithm for the default destination address selection when IPv6 is in use. The RFC suggests that administrators should be able to override the default behavior. The glibc implementation used in Linux provides the /etc/gai.conf configuration file where advanced rules for the algorithm can be configured.

Distributing configuration files and keeping them in sync is a job for Puppet. I wrote a small package for Puppet to manage /etc/gai.conf.

Continue reading "Manage /etc/gai.conf with Puppet"