"shade is required for this module" 即使安装了遮光罩

"shade is required for this module" even though shade is installed

我正在尝试部署一个 ansible 剧本来启动一些新的 openstack 实例并不断收到错误消息

"shade is required for this module"

Shade 及其所有依赖项肯定已安装。

我试过添加

localhost ansible_python_interpreter="/usr/bin/env python"

按照此处的建议添加到 ansible 主机文件,但这没有用。

https://groups.google.com/forum/#!topic/ansible-project/rvqccvDLLcQ

如有任何解决此问题的建议,我们将不胜感激。

在我的主机文件中,我有以下内容:

[local]
127.0.0.1 ansible_connection=local ansible_python_interpreter="/usr/bin/python"

到目前为止,我还没有使用过 venv,我的 playbook 运行良好。 通过添加 ansible_connection= 本地,它应该告诉你的剧本在 Ansible 机器上执行(我想这就是你想要做的)。

然后当我启动剧本时,我会从以下内容开始:

- hosts: local
  connection: local

不确定这是否是问题所在。如果这不起作用,您应该向我们提供更多信息(至少摘录您的剧本)。

祝你好运!

尝试使用pip安装ansible,因为我不知道为什么我的发行版提供的ansible包的python环境与shade模块(使用pip安装)不一样。

在 ArchLinux 上

sudo pacman -R ansible
sudo pip install ansible