【问题标题】:Can't install python modules on ansible master无法在 ansible master 上安装 python 模块
【发布时间】:2017-11-01 06:03:50
【问题描述】:

我已经使用 yum 在 centos 7 VM 上安装了 ansible。我目前正在运行 2.3.0 版。

我尝试通过主机使用“digital_ocean”模块:“localhost”,但出现以下错误:

fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "dopy >= 0.3.2 required for this module"}

我想我需要安装一个 python 模块。不幸的是,显然我的主机上没有安装 python,因为没有找到 pip 程序。

我使用 yum 安装了 pip:

yum install -y python-pip

然后我安装了dopy模块:

sudo pip install 'dopy>=0.2.3,<=0.2.3'

但不幸的是,即使在那之后我仍然有同样的错误。我猜安装的python包不是ansible捡到的,可能是因为ansible必须在机器上有自己的python包repo(不熟悉python)。

我该怎么办?

【问题讨论】:

  • 安装请求的dopy版本。
  • 感谢愚蠢的错误

标签: ansible python-module


【解决方案1】:

当然,我误读了版本,并认为我安装了正确的版本。 我尝试安装 dopy 3.2.0 版,但它不存在。 我安装了最后一个版本,它工作正常。

【讨论】:

    猜你喜欢
    • 2020-10-05
    • 1970-01-01
    • 1970-01-01
    • 2019-07-07
    • 1970-01-01
    • 1970-01-01
    • 2011-12-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多