Navigation Menu

Skip to content

Commit

Permalink
Sort AMIs in the opposite order to correctly choose one
Browse files Browse the repository at this point in the history
Previously, we iterated through the list of possible AMIs and kept track
of the oldest non-fork AMI to use for provisioning. Instead, we should
have been finding the newest non-fork AMI. By iterating in the other
direction, we can achieve that.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
  • Loading branch information
stevekuznetsov committed May 24, 2017
1 parent 544fa09 commit 1617fc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oct/ansible/oct/roles/aws-up/tasks/main.yml
Expand Up @@ -44,7 +44,7 @@
image_stage: '{{ origin_ci_aws_ami_stage }}'
ready: 'yes'
sort: 'creationDate'
sort_order: descending
sort_order: ascending
no_result_action: fail
register: ami_facts

Expand Down

0 comments on commit 1617fc0

Please sign in to comment.