java.inner.uid.switch.yml
774 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: "uid"
prompt: "Please input uid(for example, 50873076) force to aws"
private: no
tasks:
- name: "make sure user type YES to confirm"
fail:
msg: "user do not type YES"
when: confirmation != 'YES'
- name: "make sure uid exist"
fail:
msg: "user do not type uid"
when: uid | length < 1
- name: configure uid force to aws
uri:
url: "http://{{item}}/switch?method=force&uid={{uid}}"
headers:
Host: 'erp.yoho.yohoops.org'
with_items: "{{ groups['java-nginx'] }}"