##### SUMMARY

`docker_container` module often fails because removal of `auto_remove: yes` takes some time. I had the same problem before with shell scripts since `docker stop` returns immediately but container removal takes some time to finish. Until removal is finished, no new container with the same name can be created.

The error message is:

    Error creating container: 409 Client Error: Conflict ("Conflict. The container name "/MYCONTAINER" is already in use by container "HASH". You have to remove (or rename) that container to be able to reuse that name.")

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
docker_container

##### ANSIBLE VERSION
```
ansible 2.9.2
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/USER/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.17rc1 (default, Oct 10 2019, 10:26:01) [GCC 9.2.1 20191008]

```

##### CONFIGURATION
_no changes_

##### OS / ENVIRONMENT
Ubuntu 19.10


##### STEPS TO REPRODUCE

0. Run playbook to create container
0. Apply many changes to the file system
0. Run playbook again

```yaml
docker_container:
  name: SOMETHING
  image: SOMETHING
  state: started
  detach: yes
  recreate: yes
  autoremove: yes
```

##### EXPECTED RESULTS
Wait for removal before trying to create a new container.


##### ACTUAL RESULTS
Command fails.

```
Error creating container: 409 Client Error: Conflict ("Conflict. The container name "/MYCONTAINER" is already in use by container "HASH". You have to remove (or rename) that container to be able to reuse that name.")
```


description:
          - The permission mode for the tmpfs mount.
        type: str
  name:
    description:
      - Assign a name to a new container or match an existing container.
      - When identifying an existing container name may be a name or a long or short container ID.
    type: str
    required: yes
  network_mode:
    description:
      - Connect the container to a network. Choices are C(bridge), C(host), C(none), C(container:<name|id>), C(<network_name>) or C(default).
      - "*Note* that from Ansible 2.14 on, if I(networks_cli_compatible) is C(true) and I(networks) contains at least one network,
         the default value for I(network_mode) will be the name of the first network in the I(networks) list. You can prevent this
         by explicitly specifying a value for I(network_mode), like the default value C(default) which will be used by Docker if
         I(network_mode) is not specified."
    type: str
  userns_mode:
    description:
      - Set the user namespace mode for the container. Currently, the only valid value are C(host) and the empty string.
    type: str
    version_added: "2.5"
  networks:
    description:
      - List of networks the container belongs to.
      - For examples of the data structure and usage see EXAMPLES below.
      - To remove a container from one or more networks, use the I(purge_networks) option.
      - Note that as opposed to C(docker run ...), M(docker_container) does not remove the default
        network if I(networks) is specified. You need to explicitly use I(purge_networks) to enforce
        the removal of the default network (and all other networks not explicitly mentioned in I(networks)).