Hypermagnet

Client Hostname Specific File Serving

This is awesome. I’ve been hoping for functionality like this and I’m very pleased its so simple to use.

The Deets OK, I’ll be more specific. For quite some time I’ve relied upon ssh to login to remote servers and manually edit configuration files. Its a time intensive and error prone process, and most importantly, there are no systematic procedures involved, so there are no manageable assets built up over time!

It took me awhile, but I started to use Puppet to configure services on my network which all use the same configuration files. But what about services that use a different configuration on each host? I expected to variations:

  • Client host specific configuration files
  • Configuration file templates which can be customized for each client

Client Specific Files This is what I referred to as being easier than I thought:

class rsync {

    package { rsync: ensure => latest }

    file { "rsyncd.conf":
        name => "/etc/rsyncd.conf",
        owner => "root",
        group => "root",
        mode  => 644,
        source  => "puppet://fileserver.example.com/rsync/rsyncd.$hostname.conf",
        require => Package["rsync"],
    }

}

I’m surprised that the $hostname variable uses the host short name.

Configuration File Templates This would be sweet, but I haven’t figured out how to set it up yet. Looks like ERB is the way to go.