[WARNING]: Platform linux on host 10.221.236.243 is using the discovered Python interpreter at /usr/
[WARNING]: Platform linux on host 10.221.236.242 is using the discovered Python
·
[nmyunwei@nm-foot-gxc-home02 ~]$ ansible all -m ping
[WARNING]: Platform linux on host 10.221.236.243 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.9/reference_appendices/interpreter_discovery.html for more information.
10.221.236.243 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
ansible执行命令时报警告信息
[WARNING]: Platform linux on host 10.221.236.243 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.9/reference_appendices/interpreter_discovery.html for more information.
修改/etc/ansible/ansible.cfg配置文件,添加如下内容
default组下添加参数
[defaults]
interpreter_python = auto_legacy_silent
# some basic default values...
[nmyunwei@nm-foot-gxc-home02 ~]$ ansible all -m ping
10.221.236.243 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐



所有评论(0)