问题描述
我正在尝试使用 this repo 作为 Ansible 模块,
所以我 git 克隆了它,进入示例文件夹并尝试运行:
export ANSIBLE_LIBRARY=/home/XXX/ansible-for-nsxt-master
ansible-playbook -vvv deploy_nsx_cluster/02_configure_compute_manager.yml
主要错误是:
fatal: [127.0.0.1]: Failed! => {
"msg": "Could not find imported module support code for nsxt_fabric_compute_managers. Looked for either request.py or vmware_nsxt.py"
}
似乎模块 (library/nsxt_fabric_compute_managers.py) 正在寻找名为 vmware_nsxt.py 的 module_utils,它实际上存在于 module_utils/vmware_nsxt.py 中
我尝试将 ansible.cfg 中的 module_utils 变量直接设置为 module_utils 文件夹和其他类似的调整,但我仍然收到此错误。
我找不到使用此模块的方法,有人可以帮助我吗?
这是我的环境的 ansible --version
输出:
ansible 2.9.16
config file = None
configured module search path = ['/home/neito/.ansible/plugins/modules','/usr/share/ansible/plugins/modules']
ansible python module location = /home/neito/.local/lib/python3.6/site-packages/ansible
executable location = /home/neito/.local/bin/ansible
python version = 3.6.8 (default,May 6 2020,12:04:35) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
我正在离线 RHEL7.9 机器上工作,这就是为什么我不在 ansible 2.10 上
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)