Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions roles/aws/aws_ec2_with_eip/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@
virtualization-type: "{{ aws_ec2_with_eip.ami_virtualization_type }}"
register: _aws_ec2_with_eip_ami_images

- name: Quit if no AMI found.
ansible.builtin.fail:
msg: "No AMI found using the provided filters, exiting!"
when: _aws_ec2_with_eip_ami_images.images | length == 0

# Do not create an instance if _aws_hostname is not an EC2 generated address unless `force: true`
- name: Create new EC2 instance.
amazon.aws.ec2_instance:
Expand Down
Loading