[ansible-project] Skip the hosts when one host is exectued task successfully

2016-03-02 Thread Balaji Sunku
My Playbook:
---
- hosts: web
  vars:
increaseCount: 0
  remote_user: root
  tasks:
  - name: Verifying HTTP endpoint
uri:
  url: "http://{{inventory_hostname}}:{{httpd_port}}/Test";
  method: PUT
  body: "{{ lookup('file',test.json') }}"
  status_code: 200
  body_format: json
  return_content: yes
register: http_verify_out
failed_when: http_verify_out.status != 200


My scenario:
I am using ansible 2.0.1
In playbook hosts: web will be having multiple hosts.
If one host is executed the task successfully i want to skip the other 
hosts to execute the tasks.

Is there away to achieve this ?. If yes please let me know the solution 

Thanks in advance :)

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/aaa363d2-473c-4839-985b-5558b656ebd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Skip the other hosts when one host is exectued task successfully

2016-03-01 Thread Balaji Sunku
Hi ,

I am new to Ansible. Please find query details below:

I need to invoke REST API(I am Using uri module). I need to skip the hosts 
when one host is executed the task successfully.
Is there any existing solution for this?. If yes, Please post me.

Thanks in advance :)
 

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8a0e4acb-aaa2-4add-a31e-37380a514e08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Skip other hosts once one host is executed successfully

2016-03-01 Thread Balaji Sunku
Hi ,

I am new to Ansible. I have query regarding Skipping the execution of task. 
May be it is simple or stupid question :).

Scenario : 
Task is invoking REST API(using URI Module).
Is it possible to Skip other hosts once one host this Task is executed 
successfully.


-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bad6c163-f3f4-4d9d-a8ef-c80004e197b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.