ec2: fix instids and res_list being referenced before assigned - fixes #22692 (#23053)
ec2: fix instids and res_list being referenced before assigned - fixes #22692 (#23053)

* add else statement to ensure instids is set

set res_list to None to avoid UnboundLocalError and fix iteration over a nonetype by adding an empty tuple

* make res_list empty tuple by default and check for instids before setting tags (fails otherwise)

thaim/ansible,thaim/ansible