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

使用命令 ansible test -f 5 -m ping -u test 测试ansible主机连通性时,出现告警如下

# ansible test -f 5 -m ping -u test
[DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set to allow bad characters in group names by default, this will change, but still be user configurable on deprecation. This feature will be removed in version 2.10. Deprecation warnings can  be disabled by setting deprecation_warnings=False in ansible.cfg.
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
192.168.1.100 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": false,
    "ping": "pong"
}

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

 

参考链接:https://stackoverflow.com/questions/66185645/tower-what-is-causing-warning-invalid-characters-were-found-in-group-names

你可能感兴趣的:(linux)