Hi Dick and Ansible gurus,
I want to continue to other items of loop even if any of the item is failed
in loop(probably we did not define that item and because of that - item
failed, in that case it should continue to remaining items). How can we use
ignore_errors:yes which applies to all items in loop.
Below is snippet :
name: Application Configuration
uri:
url: http://{{ my_ip | default(ansible_fqdn) }}:{{8080 + (instance_id |
int -1)*100}}/my-config/rest/{{item.resource}}
body_format: json
method: PUT
body: "{{item.name}}"
user: "{{ app_user }}"
password: "{{ api_password }}"
force_basic_auth: true
follow_redirects: all
with_items:
- { name: '{{item1cfg}}', resource: 'item1' }
- { name: '{{item2cfg}}', resource: 'item2' }
- { name: '{{item3cfg}}', resource: 'item3' }
when: item1cfg is defined or item2cfg is defined or item3cfg is defined
ignore_errors: yes
Rahul
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAGH8rEwi%3DSAOTWHw1MnNHAbpqa0_8wUsaxQCEHU%3DKa%3DBM9gB5Q%40mail.gmail.com.