Authored by root

新增搜索中心切换playbook

... ... @@ -35,6 +35,8 @@ java:
inner_lb: internal-java-inner-lb-464503140.cn-north-1.elb.amazonaws.com.cn.
single_inner_lb: 10.66.4.112
# search
search_lb: internal-java-inner-lb-464503140.cn-north-1.elb.amazonaws.com.cn.
#rabbit
... ...
... ... @@ -34,6 +34,8 @@ java:
inner_lb: 10.66.4.112
single_inner_lb: 10.66.4.112
# search
search_lb: 10.66.4.112
#rabbit
... ...
... ... @@ -34,6 +34,9 @@ java:
inner_lb: 10.66.104.6
single_inner_lb: 10.66.4.112
# search
search_lb: 10.66.104.6
#rabbit
rabbit:
common_local: 10.66.104.6
... ...
---
# Offline testing...
# dns server reconfigure to match: search traffic switch between AWS and QCLOUD
- hosts: nameserver-master
vars_prompt:
- name: "confirmation"
prompt: "Sync and reload dns server. Please Enter DNS to continue."
private: no
- name: "search_center"
prompt: "Switch to the target cloud center. Please Enter AWS or QCLOUD."
private: no
pre_tasks:
- set_fact:
search_lb: internal-java-inner-lb-464503140.cn-north-1.elb.amazonaws.com.cn.
when: (search_center == 'AWS')
- set_fact:
search_lb: 10.66.4.112
when: (search_center == 'QCLOUD')
remote_user: root
roles:
- yoho.dns
... ...
... ... @@ -117,7 +117,7 @@ uic IN {{ A if ( java.inner_lb |
api.yoho IN {{ A if ( java.inner_lb | ipv4) else CNAME }} {{ java.inner_lb }}
service.yoho IN {{ A if ( java.inner_lb | ipv4) else CNAME }} {{ java.inner_lb }}
erp.yoho IN {{ A if ( java.inner_lb | ipv4) else CNAME }} {{ java.inner_lb }}
search IN {{ A if ( java.inner_lb | ipv4) else CNAME }} {{ java.inner_lb }}
search IN {{ A if ( java.search_lb | ipv4) else CNAME }} {{ java.search_lb }}
message-controller IN {{ A if ( java.single_inner_lb | ipv4) else CNAME }} {{ java.single_inner_lb }}
single IN {{ A if ( java.single_inner_lb | ipv4) else CNAME }} {{ java.single_inner_lb }}
gateway.erp IN {{ A if ( java.single_inner_lb | ipv4) else CNAME }} {{ java.single_inner_lb }}
... ...