title: The conditional check dict object' has no attribute ansible error
body: <p>I have a playbook which runs without issues in us-east-1 , but having issues in ap-southeast-1 in aws. Here is the part of playbook where it fails </p>
  
  <pre><code>- hosts: "tag_deployment_group_{{ env }}_{{ app }}"
    gather_facts: false
    remote_user: root
    tasks:
      - name: "wait for instances to be reachable"
    wait_for_connection:
      delay: 60
      timeout: 500
  - ec2_remote_facts:
      region: ap-southeast-1
      aws_access_key: "{{ aws_access_key }}"
      aws_secret_key: "{{ aws_secret_key }}"
      filters:
        "tag:Env": "{{ env }}"
    register: instance_facts
  - add_host:
      name: "{{ item.tags.Name }}"
      ansible_host: "{{ item.private_ip_address }}"
      group: "{{ env }}_{{app}}"
    with_items: "{{ instance_facts.instances }}"
  - name: "copy cron script"
    copy: src=/etc/ansible/files/delete.sh dest=/root/scripts/delete.sh
    when: item.tags.app_type == 'platform'
    with_items: "{{ instance_facts.instances }}"
  </code></pre>
  
  <p>The error I get is as follows</p>
  
  <pre><code>"failed": true, 
  "msg": "The conditional check 'item.tags.app_type == 'platform'' 
  failed. The error was: error while evaluating conditional 
  (item.tags.app_type == 'platform'): 'dict object' has no attribute 
  'app_type'\n\nThe error appears to have been 
  ts.yml': line 80, column 7, but may\nbe elsewhere in the file depending 
  on the exact syntax problem.\n\nThe offending line appears to be:\n\n      
  with_items: \"{{ instance_facts.instances }}\"\n    - name: \"copy cron 
  script\"\n      ^ here\n"
  </code></pre>