I am able to spin up servers with the ‘ec2’ module. I’m running Ansible 2.3.1.0 from source on Ubuntu.
╰─➤ dpkg -l | grep -i boto 2 ↵
ii python-boto 2.40.0-1ubuntu1 all Python interface to Amazon’s Web Services - Python 2.x
ii python-boto3 1.4.2-1 all Python interface to Amazon’s Web Services - Python 2.x
ii python-botocore 1.5.7-1 all Low-level, data-driven core of boto 3 (Python 2)
- name: aws | find latest ami for Ubuntu 16.04
ec2_ami_find: name=“ubuntu/images/*” region=us-west-1 sort=name sort_order=descending state=availiable no_result_action=fail
register: ami_find
…
“msg”: “No AMIs matched the attributes: {"state": "availiable", "name": "ubuntu/images/"}”
…
same thing if I use “ubuntu”. Putting “ubuntu/images/*” into the AWS us-west-1 console AMI search box results in 7,666 AMIs.
If I remove state=availiable I get:
“msg”: “template error while templating string: Expected an expression, got ‘end of print statement’. String: {{}}”
Any ideas?