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

TJ *_*ang 3 amazon-ec2 ansible

我使用的是ansible 2.1.0.当我尝试使用ec2_vol创建一个新卷时,我得到的错误是'Volume'对象没有属性'encrypted'.跟踪是:

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'
Run Code Online (Sandbox Code Playgroud)

有没有人见过这个?

TJ *_*ang 5

我的问题与我的python boto版本与我正在使用的ansible版本不兼容的事实有关.在Ubuntu中使用apt-get安装版本2.20,我想我至少需要2.30.所以我用pip来安装boto

pip install boto
Run Code Online (Sandbox Code Playgroud)

现在一切都很好.