Authored by chunhua.zhang

add playbook for forcing uid

---
# 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 < 1
- name: configure nginx's configuration
uri:
url: "http://{{item}}/switch?method=force&uid={{uid}}"
headers:
Host: 'erp.yoho.yohoops.org'
with_items: "{{ groups['java-nginx'] }}"
... ...