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],
    }
}

Join the Conversation

1 Comment

  1. Trimox 500mg Safe Taking Amoxicillin During Ovulation Priligy Lakemedel buy cialis Cephalexin And Pregnancy Risks Cephalexin Cats

Leave a comment

Your email address will not be published. Required fields are marked *