# Ansible and ephemeral docker containers

**URL:** <https://forum.ansible.com/t/ansible-and-ephemeral-docker-containers/19537>\
**Category:** Ansible Project\
**Created:** [October 18, 2015, 12:47am UTC](https://forum.ansible.com/t/ansible-and-ephemeral-docker-containers/19537 "2015-10-18T00:47:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AJ\_NOURI](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@AJ\_NOURI](https://forum.ansible.com/u/AJ_NOURI)\
**Post date:** [October 18, 2015, 12:47am UTC](https://forum.ansible.com/t/ansible-and-ephemeral-docker-containers/19537/1 "2015-10-18T00:47:38Z")

</div>

I would like to use Ansible to manage ephemeral docker containers as SSH servers with password-challenge **for testing purposes.**

All containers are spawn from a single image, so they have the same SSH password.  
Is it possible to disable key authentication and use a single password for all destinations?

**_$ ansible -m ping all --ask-pass --su-user -vvvv_**

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [October 19, 2015, 9:15pm UTC](https://forum.ansible.com/t/ansible-and-ephemeral-docker-containers/19537/2 "2015-10-19T21:15:17Z")

</div>

In ansible.cfg you can  
[defaults]  
host\_key\_checking= False

as env var: ANSIBLE\_HOST\_KEY\_CHECKING=0

or you can bypass sshpass by using paramiko as your transport `-c  
paramiko` in the command line (also settable in ansible.cfg and env)
