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],
}
}
Comments are closed.