Changeset 12443 for trunk


Ignore:
Timestamp:
01/28/11 13:41:35 (13 years ago)
Author:
ramonb
Message:

templates/gina/cfrun_hosts.cmt:

  • dynamic template iterates through all GINA racks
  • dynamically creates 1 cfrun host file per rack
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sara_cmt/templates/gina/cfrun_hosts.cmt

    r12437 r12443  
    22#
    33#               SARA - Computing and Networking Services
    4 # Date        : Wed, 18 Aug 2010
     4# Date        : Wed, 27 Jan 2010
    55# Version     : {{ version }}
    66# Generated   : {% now "r" %}
     
    1212#       $URL$
    1313#
    14 {% load cmts_extras %}
    15 {% noblanklines %}
     14{% load ramonb_extras %}
     15{% use HardwareUnit with 'cluster__name=Gina' as gina_hosts %}
    1616
    17 {% store /usr/sara/etc/cfengine/hosts.all as output %}
    18 {% use HardwareUnit with 'cluster__name=Gina' as gina_hosts %}
     17{% getracks 'Gina' as gina_racks %}
     18
     19{% for r in gina_racks %}
     20  {% assign filename = '/var/tmp/hosts.' r.label '.in' %}
     21
     22  {% store filename %}
     23  {% noblanklines %}
    1924
    2025outputdir=/data/cfengine/output
    2126maxchild=100
    22 {% for hw in gina_hosts %}
    23   {% for i in hw.interfaces.all %}
    24     {% if i.network.name == 'gina admin'  and "administration" not in hw.roles %}
    2527
    26 {{ i.fqdn }}
     28  {% for h in gina_hosts %}
     29    {% if h.rack.label == r.label %}
     30
     31{{ h.label }}
    2732
    2833    {% endif %}
    2934  {% endfor %}
     35
     36  {% endnoblanklines %}
     37  {% endstore %}
     38
    3039{% endfor %}
    31 
    32 {% endnoblanklines %}
Note: See TracChangeset for help on using the changeset viewer.