java.inner.switch.reset.yml 532 Bytes
---
#  switch java inner upstream to aws

- hosts: localhost

  vars_prompt:
    - name: "confirmation"
      prompt: "start to reset switch config. type [YES] to continue"
      private: no
 
  tasks: 
    - name: "make sure user type YES to confirm"
      fail:
        msg: "user do not type YES"
      when: confirmation != 'YES'
  
   
    - name: configure reset
      uri:
       url: "http://{{item}}/switch?method=reset"
       headers:
          Host: 'erp.yoho.yohoops.org'
      with_items: "{{ groups['java-nginx'] }}"