yoho.search_switch_center.yml 682 Bytes
---
# 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.70.169
      when: (search_center == 'QCLOUD')

  remote_user: root
  roles:
    - yoho.dns