Well,
I just tried and tested both:
- name: run python script to make ip static
script: ../files/gce_setip.py -a {{ item.public_ip }} -n {{ ipaddrname }} -z {{ zone }}
register: res
failed_when: "res.rc == 2"
changed_when: "res.rc == 0"
with_items: gce.instance_data
and it seems to work or at least I hope so ....