Skip to content

Instantly share code, notes, and snippets.

@manicminer
Created February 14, 2016 21:21
Show Gist options
  • Save manicminer/c66352d7ba74ddc0c438 to your computer and use it in GitHub Desktop.
Save manicminer/c66352d7ba74ddc0c438 to your computer and use it in GitHub Desktop.
Find the latest Arch Linux AMI
- hosts: localhost
connection: local
tasks:
- ec2_ami_find:
name: "arch-linux-hvm-*.x86_64-ebs"
virtualization_type: hvm
owner: 093273469852 # Uplink Labs
sort: name
sort_order: descending
sort_end: 1
no_result_action: fail
register: ami_search
- debug:
msg: "{{ ami_search.results[0].ami_id }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment