Ansible执行时告警[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details

 [root@centos7-79 ansible]# ansible web-servers -m ping

[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
192.168.10.51 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
192.168.10.52 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}

解决方法:检查组名是否只包含了字母,数字,下划线"_",且组名不能数字开头,然后修改符合要求即可。

原因是组名用了中划线,应该改为下划线

 

posted @ 2022-06-05 20:50  北极之光的博客  阅读(1901)  评论(0编辑  收藏  举报