title: Not able to create a docker container using ansible
body: <h3>Issue -1</h3>
  
  <p>I installed docker docker-py, pip, python set-up tools,docker-io via ansible.</p>
  
  <p>I tried to install container inside the docker using "ansible-container init", ansible-container build" but i get a syntax error,</p>
  
  <pre><code>***Traceback (most recent call last):
    File "/usr/bin/ansible-container", line 11, in &lt;module&gt;
      load_entry_point('ansible-container==0.3.0', 'console_scripts', 'ansible-container')()
    File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 560, in load_entry_point
      return get_distribution(dist).load_entry_point(group, name)
    File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 2648, in load_entry_point
      return ep.load()
    File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 2302, in load
      return self.resolve()
    File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 2308, in resolve
      module = __import__(self.module_name, fromlist=['__name__'], level=0)
    File "/usr/lib/python2.6/site-packages/container/cli.py", line 12, in &lt;module&gt;
      from . import engine
    File "/usr/lib/python2.6/site-packages/container/engine.py", line 554
      special_set = {'.', ':'}
                        ^
  SyntaxError: invalid syntax***
  </code></pre>
  
  <h3>Issue 2</h3>
  
  <p>I even tried build and running using docker-images and docker-container in the yaml file.</p>
  
  <p>I get some-otherlike below.</p>
  
  <pre><code>***TASK [Build Docker image from Dockerfiles.] ************************************
  ok: [192.168.56.104]
  TASK [Run the test container.] *************************************************
  An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'NoneType' object has no attribute 'keys'
  fatal: [192.168.56.104]: FAILED! =&gt; {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_UTbJkn/ansible_module_docker_container.py\", line 2007, in &lt;module&gt;\n    main()\n  File \"/tmp/ansible_UTbJkn/ansible_module_docker_container.py\", line 2000, in main\n    cm = ContainerManager(client)\n  File \"/tmp/ansible_UTbJkn/ansible_module_docker_container.py\", line 1652, in __init__\n    self.present(state)\n  File \"/tmp/ansible_UTbJkn/ansible_module_docker_container.py\", line 1677, in present\n    different, differences = container.has_different_configuration(image)\n  File \"/tmp/ansible_UTbJkn/ansible_module_docker_container.py\", line 1220, in has_different_configuration\n    expected_exposed=[re.sub(r'/.+$', '', p) for p in config.get('ExposedPorts', dict()).keys()],\nAttributeError: 'NoneType' object has no attribute 'keys'\n", "module_stdout": "", "msg": "MODULE FAILURE"}
          to retry, use: --limit @/home/vagrant/playbook/dockerinstall.retry***
  </code></pre>
  
  <p>My code in yaml was like this,</p>
  
  <pre><code>   - name: Build Docker image from Dockerfiles.
       docker_image:
          name: test
          path: test
          state: build
     - name: Run the test container.
       docker_container:
          image: test:latest
          name: test
          state: present
  </code></pre>