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 ....

On Thursday, January 15, 2015 at 11:19:05 AM UTC-8, Mark Casey wrote:
>
> Hello list,
>
> Do 'failed_when:' and 'changed_when:' effect one another?
>
> (i.e. a failed task returns changed instead of failed because you'd 
> specified both flags or vice versa?)
>
> I guess I'm assuming that in any case 'failed' supersedes 'changed', and 
> these flags just change the definition of those conditions and not their 
> precedence(?).
>
> Thank you,
> Mark
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f45b9b06-9ef3-4fd6-a32e-bc4ae75b1a50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to