使用 ansible 在多个虚拟机上运行 docker swarm。
ansible 无法docker在远程机器上找到 python 模块,即使它已经安装。
运行剧本 sudo ansible-playbook -i inv2.py /etc/ansible/playbook.yml
错误信息:
fatal: [10.212.137.216]: FAILED! => {"changed": false, "msg": "Failed to import docker or docker-py - No module named requests.exceptions. Try `pip install docker` or `pip install docker-py` (Python 2.6)"}
模块列表:
ubuntu@donald0:~$ pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
...
cryptography (2.1.4)
docker (3.7.1)
docker-pycreds (0.4.0)
...
万千封印
慕勒3428872
梦里花落0921
相关分类