我正在运行 YAML 文件中定义的多个 ansible play。
在上一场比赛中,我收到以下错误:
{"failed": true, "msg": "The conditional check 'ansible_os_family == \"RedHat\"' failed. The error was: error while evaluating conditional (ansible_os_family == \"RedHat\"): 'ansible_os_family' is undefined\n
我是否需要通过收集事实或
ansible.cfg
中的内容来更改任何内容? ?
最佳答案
添加:
gather_facts: true
到你的最后一场比赛并尝试。
关于ansible - 运行 Ansible play 时 undefined variable ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41617285/