title: How to run ansible task based vaule count condition
body: <p>I am trying to create one task based on the number of elements in a key.</p>
  
  <p>my input will like below as json input </p>
  
  <p>"srcaddr": "IP_192.168.10.10, IP_192.168.10.12"</p>
  
  <p>or in array of json </p>
  
  <p>"srcaddr": ['IP_192.168.10.10', 'IP_192.168.10.12']</p>
  
  <pre><code>  - name: ADD IPv4 IP ADDRESS GROUP
      chkr_fwobj_address:
        ipv4: "group"
        group_name: "ansibleIPv4Group1"
        group_members: "{{ srcaddr }}"
        adom: "{{ adom }}"
      when: "{{ srcaddr |length &gt; 1}}"
  </code></pre>
  
  <p>I want to execute the above task when the count of the element is more than one, of it is more that one the task will create a group and add the members in to the group. if we have only one element then group creation task will be ignored   </p>