我需要从组变量值和下载一些图像从dockerhub,但价值投入不正确。
我的行动手册:
hosts: all
tasks:
name: download image
docker_image:
name:
- "{{image}}"
source: pull
我的组_vars
image:
nginx
ubuntu
和错误消息:
fatal: [linux1]: FAILED! => {"changed": false, "msg": "Error pulling image ['((image))']:latest - 400 Client Error for http+docker://localhost/v1.41/images/create?tag=latest&fromImage=%5B%27%28%28image%29%29%27%5D: Bad Request (\"invalid reference format\")"}
我尝试了不同的语法变体并更新了应用程序
1条答案
按热度按时间owfi6suc1#
docker_image
模块的name
参数应该是字符串,而不是列表: