{"id":81,"date":"2008-07-13T22:08:21","date_gmt":"2008-07-14T03:08:21","guid":{"rendered":"http:\/\/blogs.cae.tntech.edu\/mwr\/2008\/07\/13\/stupid-puppet-trick-identifying-groups-of-hosts\/"},"modified":"2024-10-27T14:26:19","modified_gmt":"2024-10-27T14:26:19","slug":"stupid-puppet-trick-identifying-groups-of-hosts","status":"publish","type":"post","link":"https:\/\/sites.tntech.edu\/renfro\/2008\/07\/13\/stupid-puppet-trick-identifying-groups-of-hosts\/","title":{"rendered":"Stupid Puppet Trick: Identifying Groups of Hosts"},"content":{"rendered":"<p>My Ruby skills are practically non-existant, but I&#8217;ve managed to put together a relatively readable custom fact for identifying my Torque queues by a node&#8217;s hostname. Behold, <a href=\"http:\/\/reductivelabs.com\/trac\/puppet\/wiki\/Recipes\/HostgroupFact\">HostgroupFact<\/a>! 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.<\/p>\n<pre>\nclass cluster-host inherits public-host {\n    # ...\n    file { \"\/etc\/hosts.equiv\":\n        source  =&gt; \"puppet:\/\/\/files\/apps\/rsh-server\/hosts.equiv.$hostgroup\",\n        owner   =&gt; root,\n        group   =&gt; root,\n        mode    =&gt; 644,\n        require =&gt; Package[rsh-server],\n    }\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>My Ruby skills are practically non-existant, but I&#8217;ve managed to put together a relatively readable custom fact for identifying my Torque queues by a node&#8217;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 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/sites.tntech.edu\/renfro\/2008\/07\/13\/stupid-puppet-trick-identifying-groups-of-hosts\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Stupid Puppet Trick: Identifying Groups of Hosts&#8221;<\/span><\/a><\/p>\n","protected":false},"author":87,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,16],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-infrastructures","category-puppet","entry"],"_links":{"self":[{"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/users\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":1,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":460,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/posts\/81\/revisions\/460"}],"wp:attachment":[{"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}