问题汇集

1,ansible web -m ping

在执行ping命令时报错:Using a SSH password instead of a key is not possible because Host Key check

解决方法:

修改/etc/ansible/ansible.cfg文件

在文件中进行搜索定位到host_key_checking

 

#host_key_checking = False

修改后:

host_key_checking = False


2,Failed to connect to the host via ssh: ssh: connect to host 192.168.41.72 port 22: Connection refused

解决方法一:

修改/root/.ssh/known_hosts

在文件中找到192.168.41.72这条信息,将其删除


3,ansible 远程执行时提示 命令未找到

解决方法:

将/etc/profile里的环境变量设置,拷到/etc/bashrc

该文章对你有帮助吗,求分享转发: 分享到QQ空间 分享给QQ好友

 

 

粤ICP备19116230号
友情链接: 码农藏书阁 天天链