deploy.yaml
---
- name: test
hosts: host_a
tasks:
- name: debug
debug:
var: demo
inventory
[host_a]
localhost
[host_a:vars]
demo=aaa
[host_b]
localhost
[host_b:vars]
demo=bbb
当我运行剧本时,我希望变量demo
返回aaa
,但它返回bbb
。
为什么?