如何在ansible docker_容器模块中使用输出_日志
以下是我正在扮演的角色:如何在ansible docker_容器模块中使用输出_日志,docker,ansible,Docker,Ansible,以下是我正在扮演的角色: - name: run hello-world docker_container: detach: no output_logs: yes name: test image: hello-world log_driver: json-file $ ansible-playbook test.yml -i=<some_remote_host>, 下面是我正在运行的命令: - name: run hello-wor
- name: run hello-world
docker_container:
detach: no
output_logs: yes
name: test
image: hello-world
log_driver: json-file
$ ansible-playbook test.yml -i=<some_remote_host>,
下面是我正在运行的命令:
- name: run hello-world
docker_container:
detach: no
output_logs: yes
name: test
image: hello-world
log_driver: json-file
$ ansible-playbook test.yml -i=<some_remote_host>,
$ansible playbook test.yml-i=,
和输出:
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
成为密码:
播放[全部]************************************************************************************************************************************************************************************************************************************************************************
任务[收集事实]************************************************************************************************************************************************************************************************************************************************************
好的:[]
任务[测试:运行hello world]**********************************************************************************************************************************************************************************************************************************************
更改:[]
重演************************************************************************************************************************************************************************************************************************************************************************
:ok=2 changed=1 unreachable=0 failed=0 skipped=0 Saved=0 ignored=0
我错过了什么?如何在不注册输出并在专用节点中打印日志的情况下打印日志(我现在可以使用该节点,但如果我们有专用选项的话,它似乎是人工的)