hostvars[item]['ansible_nodename']我们有几个使用主机item别名的剧本。它通常有效。但有时不行,出现以下错误:
'dict object' has no attribute 'ansible_nodename`
Run Code Online (Sandbox Code Playgroud)
我打印了内容hostvars,但没有看到这个属性。
我找不到文档来hostvars了解我们可以安全地使用什么ansible_nodename。所以,问题是:
ansible_nodename为吗ansible_host?hostvars在哪里可以找到其创建内容和算法的描述?ansible ×1