Here's a role I'm running:
- name: run hello-world
docker_container:
detach: no
output_logs: yes
name: test
image: hello-world
log_driver: json-file
and here's the command I'm running:
$ ansible-playbook test.yml -i=<some_remote_host>,
and output:
BECOME password:
PLAY [all] ************************************************************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] ************************************************************************************************************************************************************************************************************************************************************
ok: [<some_host>]
TASK [test : run hello-world] **********************************************************************************************************************************************************************************************************************************************
changed: [<some_host>]
PLAY RECAP ************************************************************************************************************************************************************************************************************************************************************************
<some_host> : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
What am I missing? How do I print logs without registering output and printing it in a dedicated node (which I now works, but seems artificial, if we have a dedicated option for this)