严重错误:lxc模块不可导入.检查要求 [英] Ansible Error : The lxc module is not importable. Check the requirements
本文介绍了严重错误:lxc模块不可导入.检查要求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的任务看起来像这样
- name: Create a started container
lxc_container:
name: test-container-started
container_log: true
template: ubuntu
state: started
template_options: --release trusty
我收到以下错误:
> TASK: [lxc | Create a started container]
> ************************************** failed: [localhost] => {"failed": true, "parsed": false}
> BECOME-SUCCESS-azsyqtknxvlowmknianyqnmdhuggnanw failed=True msg='The
> lxc module is not importable. Check the requirements.' The lxc module
> is not importable. Check the requirements.
>
>
> FATAL: all hosts have already failed -- aborting
推荐答案
我遇到了同样的问题,并通过确保在目标计算机上的系统范围内pip install lxc-python2
来解决了该问题.
I just ran into the same issue andI solved it by making sure to pip install lxc-python2
system-wide on the target machine.
在我的情况下,目标是通过ansible_connection=local
主机是localhost,我以为我可以摆脱pip: name=lxc-python2
,但已安装到当前的virtualenv中.
In my case the target was localhost via an ansible_connection=local
host and I thought I could get away with pip: name=lxc-python2
, but that installed into my current virtualenv.
这篇关于严重错误:lxc模块不可导入.检查要求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文