This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Find existing AMI if it exists | |
local_action: | |
module: command aws ec2 describe-images --owners self --filters Name=tag-value,Values={{deploy_env}}-{{service}} --query Images[0].ImageId --output text --region {{region}} | |
register: deletable_ami | |
ignore_errors: True | |
tags: | |
- build | |
- configure |