TJ Tang
TJ Tang

Reputation: 931

error creating a new ec2 volume with ansible

I am using ansible 2.1.0. When I try to use ec2_vol to create a new volume, the error I get is 'Volume' object has not attribute 'encrypted'. The trace is:

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'

Has anyone else seen this?

Upvotes: 3

Views: 497

Answers (1)

TJ Tang
TJ Tang

Reputation: 931

My issue was related to the fact that my version of python boto was not compatible with the ansible version I was using. Using apt-get in Ubuntu install version 2.20, and I think I need at least 2.30. So I used pip to install boto

pip install boto

An everything is fine now.

Upvotes: 5

Related Questions