title: Ansible 2.2 backward compatibility
body: <p>try to provision new instance on ec2</p>
  
  <p>works fine with ansible 2.1 and failed with ansible 2.2
  (See the error below)</p>
  
  <pre><code>  - name: Provision Windows 2012
      local_action:
        module: ec2
        key_name: "{{key_name}}"
        region: "{{aws_region}}"
        group_id: [ "{{basic_firewall.group_id}}" , sg-123456 ]
        instance_type: t2.small
        image: "{{ami_2012r2}}"
        vpc_subnet_id: "{{vpc_subnet_id}}"
        count: 1
        wait: no
        instance_tags: '{"Name":"2012r2-DSM-Agent-{{TAG}}-{{BuildNumber}}","Role":"Agent2","Build":"{{BuildNumber}}","Owner":"{{Owner}}","Test":"1.Pair.UB.backup.restore"}'
      register: ec2_agent2_agent
    - name: debug instance start
      debug: 'msg="{{ ec2_agent2_agent}}"'
    - name: add newly provisioned servers to a group 2012r2_agent
      local_action: add_host 
                    hostname={{item.private_ip}} 
                    groupname=agent2,agents,windows,all_windows
                    TAG={{TAG}} 
                    ProductVersion={{ProductVersion}} 
                    BuildNumber={{BuildNumber}} 
                    Owner={{Owner}} 
                    RunTests={{RunTests}} 
                    Name=agent2
                    IP={{item.private_ip}}
      with_items: ec2_agent2_agent.instances
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>fatal: [localhost]: FAILED! =&gt; {
      "failed": true,
      "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'unicode object' has no attribute 'private_ip'\n\nThe error appears to have been in '/opt/SVN/trunk/testing/environments/EC2.DSM.1.Pair.Backup.Restore.UB.test.yml': line 136, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n    register: ec2_ubuntu_dsm\n  - name: add newly provisioned servers to a group ubuntu_dsm\n    ^ here\n"
  }
  </code></pre>