just show one image
authorLorin Hochstein <lhochstein@netflix.com>
Sat, 11 Feb 2017 06:18:27 +0000 (22:18 -0800)
committerLorin Hochstein <lhochstein@netflix.com>
Sat, 11 Feb 2017 06:18:27 +0000 (22:18 -0800)
ch12/playbooks/image.yml

index 1257a1f..77b0ce3 100644 (file)
@@ -4,7 +4,10 @@
   tasks:
     - name: find the image
       ec2_ami_find:
-        name: "ubuntu/images/ebs/ubuntu/xenial-16.04-amd64-server-*"
+        name: "ubuntu/images/ebs/ubuntu-trusty-14.04-amd64-server-*"
+        sort: name
+        sort_order: descending
+        sort_end: 1
       register: ami
     - name: output image info
       debug: var=ami