I have a simple playbook that:
1 - starts an EC2 instance
2 - configures it
3 - creates an AMI from it
4 - terminates it
Over the last few days, I’ve been seeing the job fail quite frequently on step 4, because it’s taking AWS too long to shut down the instance:
TASK: [destroy all instances] *************************************************
failed: ] => (item=) => {“failed”: true, “item”: “****0”}
msg: wait for instance termination timeout on Fri Oct 10 06:39:56 2014
It seem obvious that this us an EC2 issue, but is there any way to change how long Ansible will wait for an instance to terminate?