1、警告信息影响视觉

1. 无效字符

:::color5 [WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details

:::

  • 存在无效字符
  • 检查组名称中是否有非字母、数字或_.
  • 如果存在破折号(-)换成下划线(_)即可

2. Python解释器

:::color5 [WARNING]: Platform linux on host 10.223.225.201 is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python

interpreter could change this. See https://docs.ansible.com/ansible/2.8/reference_appendices/interpreter_discovery.html for more information.

:::

解决办法:

  • <font style="color:rgb(77, 77, 77);">ansible.cfg</font><font style="color:rgb(77, 77, 77);">[defaults]</font>部分添加配置<font style="color:rgb(56, 58, 66);background-color:rgb(250, 250, 250);">interpreter_python = auto_legacy_silent</font>
  1. [defaults]
  2. interpreter_python = auto_legacy_silent

2、错误信息

1. 禁用主机名秘钥检查

  • <font style="color:rgb(171, 178, 191);background-color:rgb(40, 44, 52);">/etc/ansible/ansible.cfg</font> 文件中的defaults下添加<font style="color:rgb(77, 77, 77);">host_key_checking = False</font>
  1. # 打开注释即可
  2. host_key_checking = False