1
使用容器容器(版本0.2.0)并尝试使用var_files
指令将变量传递到剧本(main.yml)。没有运气。不断收到:剧本中的容器容量变量
ansible-container_1 | ERROR! 'var_files' is not a valid attribute for a Play
的main.yml文件中有此块:
- hosts: all
var_files:
- postgres_vars.yml
文档似乎表明这是正确的做法。
所有的建议表示赞赏。
后续行动: 尝试了文档中列出的建议,他们似乎也没有工作。
sudo ansible-container --var-file ./ansible/postgres_vars.yml build --from-scratch
失败,缺少变量名错误。
[提交请求](https://github.com/ansible/ansible-container/pull/344)。 – tedder42