ansible returns with "Failed to import the required Python library (Docker SDK for Python: docker (Python >= 2.7) or docker-py (Python 2.6))

后端 未结 2 2120
悲&欢浪女
悲&欢浪女 2021-01-11 21:21

I am running myserver in ubuntu:

+ sudo cat /etc/os-release
NAME=\"Ubuntu\"
VERSION=\"16.04.6 LTS (Xenial Xerus)\"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=\"Ubu         


        
2条回答
  •  梦毁少年i
    2021-01-11 21:57

    In my case (Ubuntu 20 with installed docker) these commands was required

    apt update
    apt install python3 python3-pip
    pip3 install docker docker-compose
    

    Detailed requirements:

    https://docs.ansible.com/ansible/latest/collections/community/general/docker_compose_module.html

= 2.7) or docker-py (Python 2.6))" id="ans_title" name="title">
提交回复
热议问题