gpt4 book ai didi

Ansible Error : The lxc module is not importable. 查看需求

转载 作者:行者123 更新时间:2023-12-03 22:07:27 36 4
gpt4 key购买 nike

我的任务看起来像这样

- 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

最佳答案

如果您使用 Debian 或 Ubuntu 作为主机系统,则已经有可用的 python-lxc 软件包。安装它的最佳方法当然是 Ansible,就在 lxc_container 任务之前:

  tasks:

- name: Install provisioning dependencies
apt: name=python-lxc

- name: Create docker1.lxc container
lxc_container:
name: docker1
...

关于Ansible Error : The lxc module is not importable. 查看需求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32051734/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com