I am very confused about how you should run EC2 instances using Ansible.
I am trying to use ec2.py inventory scripts. I'm not sure which one is supposed to be used, because there are three installed with Ansible:
- ansible / Library / ansible / module_utils / ec2.py
- anzibl / Library / ansibl / modules / core / cloud / Amazon /ec2.py
- ansible / plugins / inventory / ec2.py
I thought running it in inventory / would make more sense, so I run it using:
ansible-playbook launch-ec2.yaml -i ec2.py
which gives me:
msg: Either region or ec2_url must be specified
So, I add the scope (even if I have vpc_subnet_id specified), and I get:
msg: Region us-east-1e does not seem to be available for aws module boto.ec2. If the region definitely exists, you may need to upgrade boto or extend with endpoints_path
, Amazon, , ec2, VPC? Amazon, "EC2 Classic" .
ec2.py script cloud/amazon/, :
ERROR: Inventory script (/software/ansible/lib/ansible/modules/core/cloud/amazon/ec2.py) had an execution error:
.
, ec2.py /module _utils , . , :
. /software/ansible/lib/ansible/module _utils/ec2.py , . script, chmod -x /software/ansible/lib/ansible/module_utils/ec2.py.
, , ec2.py, :
ERROR: /software/ansible/lib/ansible/module_utils/ec2.py:30: Invalid ini entry: distutils.version - need more than 1 value to unpack
- , ? ? , .