Hi,

I'm trying to get this:
define hostgroup{
  hostgroup_name   TableswitchesSweden
 members       dlg-prd-office-tbs01,dlg-prd-office-tbs02,dlg-prd-office-
tbs03,dlg-prd-office-tbs04,dlg-prd-office-tbs05,dlg-prd-office-tbs07,dlg-prd
-office-tbs08,dlg-prd-office-tbs10,dlg-prd-office-tbs11,dlg-prd-office-tbs12
,dlg-prd-office-tbs13,dlg-prd-office-tbs14,dlg-prd-office-tbs15,dlg-prd-
office-tbs16,dlg-prd-office-tbs17,dlg-prd-office-tbs18,dlg-prd-office-tbs19,
dlg-prd-office-tbs20
}

>From this:

extra_hosts:
  - file_name: dlg-prd-office-tbs22
    host_check_name: tbs22
    host_checks: 'http,generic-host,base-notify'
    host_check_ip: 10.0.49.71
    icon_set: network_service
    type: switches
  - file_name: dlg-prd-office-tbs23
    host_check_name: tbs23
    host_checks: 'http,generic-host,base-notify'
    host_check_ip: 10.0.49.72
    icon_set: network_service
    type: switches
  - file_name: dlg-prd-office-tbs24
    host_check_name: tbs24
    host_checks: 'http,generic-host,base-notify'
    host_check_ip: 10.0.49.73
    icon_set: network_service
    type: switches
  - file_name: dlg-prd-office-tbs25
    host_check_name: tbs25
    host_checks: 'http,generic-host,base-notify'
    host_check_ip: 10.0.49.74
    icon_set: network_service
    type: switches

I was thinking about something similar to
...
memebers     {% for unit in extra_hosts[0:] %}{% if "tbs" in unit.
host_check_name %}{{ extra_hosts.file_name }}, {% endif %} {% endfor %}
...


How wrong might I be?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bace54f9-af6b-4ccd-9dd0-adeb318ea26a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to