192.168.1.10 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via sftp: Connection closed\r\n",
"unreachable": true
}
前同事安装问题,缺少ansible.cfg,建议重装;
临时:
在ansible 当前目录下创建 ansible.cfg
在ansible 命令前面增加 ANSIBLE_REMOTE_TMP=/tmp/.ansible/tmp