title: Ansible can't resolve EC2 tag if specified in static inventory
body: <p>I am using Ansible to deploy to Amazon EC2, and I have ec2.py and ec2.ini set up such that I can retrieve a list of servers from Amazon. I have my server at AWS tagged <code>rvmdocker:production</code>, and <code>ansible all --list</code> returns my tag as <code>ec2_tag_rvmdocker_production.</code> I can also run:</p>
  
  <pre><code>ansible -m ping tag_rvmdocker_production`
  </code></pre>
  
  <p>and it works. But if I have that tag in a static inventory file, and run:</p>
  
  <pre><code>ansible all -m ping -i production
  </code></pre>
  
  <p>it returns:</p>
  
  <pre><code>tag_rvmdocker_production | UNREACHABLE! =&gt; {
      "changed": false, 
      "msg": "ERROR! SSH encountered an unknown error during the connection. Werecommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue", 
      "unreachable": true
  }
  </code></pre>
  
  <p>Here is my production inventory file:</p>
  
  <pre><code>[dockerservers]
  tag_rvmdocker_production
  </code></pre>
  
  <p>It looks like Ansible can't resolve <code>tag_rvmdocker_production</code> when it's in the static inventory file.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I followed ydaetskcoR's advice and am now getting a new error message:</p>
  
  <pre><code>$ ansible-playbook -i production app.yml 
  ERROR! ERROR! production:2: Section [dockerservers:children] includes undefined group: tag_rvmdocker_production
  </code></pre>
  
  <p>But I know the tag exists, and it seems like Ansible and ec2.py know it:</p>
  
  <pre><code>$ ansible tag_rvmdocker_production --list
    hosts (1):
      12.34.56.78
  </code></pre>
  
  <p>Here is my production inventory:</p>
  
  <pre><code>[dockerservers:children]
  tag_rvmdocker_production
  </code></pre>
  
  <p>And my app.yml playbook file:</p>
  
  <pre><code>---
  - name: Deploy RVM app to production
    hosts: dockerservers
    remote_user: ec2-user
    become: true
    roles:
      - ec2
      - myapp
  </code></pre>
  
  <p>In the end, I'd love to be able to run the same playbook against development (a VM on my Mac), staging, or production, to start an environment. My thought was to have static inventory files that pointed to tags or groups on EC2. Am I even approaching this the right way?</p>