Surely not best practice, but with Portainer I could use secrets in my local 
stack without being in a Swarm-Cluster. It works great and I thought it would 
be nice to recreate my stack in Ansible to go a step further to automate 
additional tasks outside Docker-compose 

> Am 11.04.2021 um 15:38 schrieb 'Felix Fontein' via Ansible Project 
> <[email protected]>:
> 
> Hi,
> 
> I'm not sure this is possible at all.
> 
> docker_secret is a module for Docker's swarm mode. docker_container is
> a module for Docker's non-swarm mode. If you use docker_swarm_service
> to manage a Docker swarm service, you can specify the secrets to use.
> 
> I also cannot find any reference to secrets when looking at the `docker
> run` help (which uses the same APIs as the docker_container module
> does).
> 
> Cheers,
> Felix
> 
> 
> 
> 
>> On Fri, 9 Apr 2021 06:10:54 -0700 (PDT)
>> ansiblehuhn <[email protected]> wrote:
>> 
>> Hi,
>> 
>> is there a way I can use docker_secrets within docker_container?
>> If this is not possible maybe someone could help me with this:
>> I want to configure the initial admin-password of a container.
>> Therefore I can use a mounted file in the container (for example
>> docker secret) or an encrypted string (htpasswd) as a command
>> argument. I only want to store the plain password in the ansible
>> vault, not the encrypted version or an additional file on disk.
>> 
>> Thanks for your help :)
>> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/20210411153759.5f054672%40rovaniemi.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/FE83F754-0BC2-499C-A3E8-1C9E2361D00E%40gmail.com.

Reply via email to