在 ansible 2.1.1.0 上
给定一个结构
.
|-- inventories
| `-- env
| |-- group_vars
| | `-- someconfig
| `-- hosts.ini
`-- main.yml
group_vars 为
---
myconfig: somevalue
hosts.ini 为
localhost
[env]
localhost
main.yml 为
---
- hosts: env
user: someuser
tasks:
- debug: msg="loaded {{ myconfig }}"
正在运行
ansible-playbook -i inventories/env/hosts.ini main.yml
为什么 myconfig 没有加载?