【发布时间】:2021-06-13 15:50:43
【问题描述】:
当我使用 pip install 'ansible[azure] 安装 Azure 扩展并尝试使用 ansible-playbook playbook.yml 运行剧本时,我收到以下错误:
ModuleNotFoundError: No module named 'msrest'
它还提到了Failed to import the required Python library (msrestazure)
我从official ansible docs for Azure得到这个程序。
此处完全错误:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'msrest'
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to import the required Python library (msrestazure) on DESKTOP-JL4F430's Python /home/pomatti/projects/personal/docker-swarm-cluster-with-ansible/env/bin/python3. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}
Ansible 版本:
$ ansible --version
ansible [core 2.11.1]
【问题讨论】: