Skip to content

Stupid Puppet Trick: Identifying Groups of Hosts

My Ruby skills are practically non-existant, but I’ve managed to put together a relatively readable custom fact for identifying my Torque queues by a node’s hostname. Behold, HostgroupFact! Now I can factor out my hosts.equiv files back to a parent class, rather than duplicating the same file specifications on a per-queue basis.

class cluster-host inherits public-host {
    # ...
    file { "/etc/hosts.equiv":
        source  => "puppet:///files/apps/rsh-server/hosts.equiv.$hostgroup",
        owner   => root,
        group   => root,
        mode    => 644,
        require => Package[rsh-server],
    }
}

{ 1 } Trackback

  1. Recent URLs tagged Rsh - Urlrecorder | December 30, 2008 at 9:16 am | Permalink

    […] recorded first by xTemariDesertRosex on 2008-12-21→ Stupid Puppet Trick: Identifying Groups of Hosts […]

Post a Comment

Your email is never published nor shared. Required fields are marked *