-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Step Identify OS Image (AWS AMI) does not fail when AMI is not found, because it has RC 0 even with 0 results.
ok: [ae1ascs -> localhost] => {
"__sap_vm_provision_task_aws_ami": {
"changed": false,
"failed": false,
"images": []
}
}Which results in failure during Provision AWS EC2 Virtual Server instance with unclear error which can be prevented by failing directly when __sap_vm_provision_task_aws_ami.images | length == 0 :
TASK [community.sap_infrastructure.sap_vm_provision : Provision AWS EC2 Virtual Server instance] ************************************************************
fatal: [ae1ers -> localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: No last item, sequence was empty.. No last item, sequence was empty.\n\nThe error appears to be in '/home/mmamula/ansible_collections/community/sap_infrastructure/roles/sap_vm_provision/tasks/platform_ansible/aws_ec2_vs/execute_provision.yml': line 21, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Provision AWS EC2 Virtual Server instance\n ^ here\n"}Tested
Reproducible with invalid AMI name.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working