gpt4 book ai didi

amazon-ec2 - 使用 ansible 创建新的 ec2 卷时出错

转载 作者:行者123 更新时间:2023-12-01 11:25:36 24 4
gpt4 key购买 nike

我正在使用 ansible 2.1.0。当我尝试使用 ec2_vol 创建新卷时,我得到的错误是“卷”对象没有属性“加密”。踪迹是:

An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_QgknUu/ansible_module_ec2_vol.py", line 593, in <module>
main()
File "/tmp/ansible_QgknUu/ansible_module_ec2_vol.py", line 583, in main
volume_info = get_volume_info(volume, state)
File "/tmp/ansible_QgknUu/ansible_module_ec2_vol.py", line 454, in get_volume_info
'encrypted': volume.encrypted,
AttributeError: 'Volume' object has no attribute 'encrypted'

有没有人看到这个?

最佳答案

我的问题与我的 python boto 版本与我使用的 ansible 版本不兼容有关。在 Ubuntu 中使用 apt-get 安装版本 2.20,我认为我至少需要 2.30。所以我用pip安装boto

pip install boto

现在一切都很好。

关于amazon-ec2 - 使用 ansible 创建新的 ec2 卷时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37483181/

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