I want to execute shell commands, for eg: a "wget" command inside a running docker container using Ansible. This is the playbook I am trying to execute
---
- name: Enter into a running container and run a command
docker_container:
name: centos_conatainer
state: started
image: centos
command: wget https://downloadlink.com
This stops the container and also it is not downloading the file. Is this the right way to execute shell commands using docker_container module, or is there any other way to do this using Ansible?