# Unable to output container password details when using ansible with podman

**URL:** <https://discuss.elastic.co/t/unable-to-output-container-password-details-when-using-ansible-with-podman/319563>\
**Category:** Elasticsearch\
**Created:** [November 22, 2022, 3:21pm UTC](https://discuss.elastic.co/t/unable-to-output-container-password-details-when-using-ansible-with-podman/319563 "2022-11-22T15:21:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![millerthegorilla](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@millerthegorilla](https://discuss.elastic.co/u/millerthegorilla)\
**Post date:** [November 22, 2022, 3:21pm UTC](https://discuss.elastic.co/t/unable-to-output-container-password-details-when-using-ansible-with-podman/319563/1 "2022-11-22T15:21:28Z")

</div>

Hi, when using ansible-podman, I am unable to output the std-out of the container run command as I might do when using the command line. This means that I don't get to see the automatically generated password and keystore password, along with other details.  
Even when using the tty parameter of the ansible-podman-container, the logs report:

`Auto-configuration will not generate a password for the elastic built-in superuser, as we cannot determine if there is a terminal attached to the elasticsearch process. You can use the bin/elasticsearch-reset-password tool to set the password for the elastic user."`  
There is no elastic user created, and when I exec into the container, the bin/elasticsearch-reset-password tool fails with:

`ROR: Failed to reset password for the [elasticsearch] user`

As https is standard on the 8.5 image, I am unable to use it, as I cannot set up auth properly. Also, I cannot use apt to install an editor, as the user elasticsearch does not have sufficient permissions.  
If you think this is a podman error then please let me know, and I will hassle the devs, and see if I can't get better output and tty detection etc.

An alternative I have tried is using ansible to run a shell command, but the output is no different.

What I really want is to be able to obtain the password to output to an ansible variable so that I can spin up a pod of containers, including elasticsearch, for running tests.

Alternatively, I can use elasticsearch 7.17.7 with http, but I am going to need encryption for production, and there doesn't seem to be a way to do it with ansible.

Perhaps there is an environment variable that I am missing that I could set to create the password? I have tried setting ELASTIC\_PASSWORD, but it is of no help.

I am connecting from django using django-elasticsearch-dsl, and get the following error, when verify\_cert is set to false:

`AuthenticationException(401, 'security_exception', 'missing authentication credentials for REST request [/forum_posts_index/_search]')`

Any help gratefully received 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 20, 2022, 3:21pm UTC](https://discuss.elastic.co/t/unable-to-output-container-password-details-when-using-ansible-with-podman/319563/2 "2022-12-20T15:21:53Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
