java.inner.switch.yml
689 Bytes
---
# switch java inner upstream to aws
- hosts: localhost
vars_prompt:
- name: "confirmation"
prompt: "Start to switch to aws . Please Enter YES to continue"
private: no
- name: "percentage"
prompt: "Please input percentage(for example, 10)"
default: 0
private: no
tasks:
- name: "make sure user type YES to confirm"
fail:
msg: "user do not type YES"
when: confirmation != 'YES'
- name: configure nginx's configuration
uri:
url: "http://{{item}}/switch?method=switch&percentage={{percentage}}"
headers:
Host: 'erp.yoho.yohoops.org'
with_items: "{{ groups['java-nginx'] }}"