Adding further to above, i know i can get the value i want by doing this.

- debug:
        msg: "{% for address in net_interface if address.node_name == 
'IQ-REG_NA_CLUSTER_01-01' %}{{ address.address }}{% endfor %}"

Anyway to add that logic when creating the aggregate_info list. for 
example, but when trying to do this i get a template error.  Don't know if 
its possible to do or i am missing something with my syntax.

- name: Get_Aggregate_Info
      #no_log: True
      set_fact:
        aggregate_info: "{{ aggregate_info | 
          d([]) + [ {
          'name': item.value.aggregate_name, 
          'size_available': item.value.aggr_space_attributes.size_available 
| int,
          'size_avaliable_80%': 
(((item.value.aggr_space_attributes.size_total | int) * 0.8) - 
(item.value.aggr_space_attributes.size_used | int)) | round | int,
          'size_total': item.value.aggr_space_attributes.size_total | int,
          'size_total_80%': ((item.value.aggr_space_attributes.size_total | 
int) * 0.8 ) | round | int,
          'size_used': item.value.aggr_space_attributes.size_used | int,
          'node_name': item.value.nodes.node_name,
          'percent_used_capacity': 
item.value.aggr_space_attributes.percent_used_capacity
          'test': {% for address in net_interface if address.node_name == 
item.value.nodes.node_name %}{{ address.address }}{% endfor %}
          } ] }}" 
      with_items: "{{ netapp_info.ontap_info.aggregate_info | dict2items }}"
      when:
        - ('agg_' in item.value.aggregate_name)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9de97bc8-8a90-4fc7-bc36-813623297b54o%40googlegroups.com.

Reply via email to