Ansible,安装XRoad时lxd报错:Attribute Error: NoneType has no attribute "items" lead to lxd_container.py
我尝试使用 Ansible 和 LXD 安装 XRoad,步骤如下:
sudo snap install lxd
lxd init
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install ansible
ansible-playbook hosts -i hosts/lxd_hosts.txt xroad_init.yml
我收到此错误:
Attribute Error: NoneType has no attribute "items" leading to lxd_container.py
ansible-loop-var item: xroad-lxd-cs
Localhost ok=1 failed=1
第一次我执行几乎完全相同的步骤时,没有出现任何错误。现在,当我尝试在另一台虚拟机(Ubuntu)上安装 Xroad 时,出现了此错误。
我试过:
- 重新安装 LXD、Ansible(不同版本)
- 安装 Python 3.12
- apt 更新 + 升级
- 从桥接网络更改为 NAT
- 重新安装 Ubuntu,安装不同版本的 Xroad
错误图片:
这是主要的错误:
只需这样做: