Name Last Update
..
__init__.py Loading commit data...
center_switch.py Loading commit data...
clb.py Loading commit data...
cobar.py Loading commit data...
db.py Loading commit data...
dns.py Loading commit data...
readme.md Loading commit data...
switch.ini Loading commit data...
vars.py Loading commit data...

YOHO Center Switch

准备ansible的环境

1.创建用户: useradd ansible -g root -d /home/ansible.

2.安装ansible

3.将被管理的服务器的private key copy 到 ~/.ssh/

4.git clone 本项目即可

依赖:

仅支持大于等于2.7.3并小于3.0的python版本

python模块: qcloud、ansible

安装python模块: pip install qcloud ansible

依赖脚本: switch_lb.py (http://git.yoho.cn/ops/yoho-ansible-roles/blob/master/scripts/switch_lb.py) clone本项目即可无需单独下载

switch.ini: switch.ini的配置

参考scripts/switch/switch.ini

How to Run

根据需要修改本地配置文件switch.ini(http://git.yoho.cn/ops/yoho-ansible-roles/blob/master/scripts/switch/switch.ini)

需在配置文件中准确填写相关的密钥、密码、负载均衡等信息

需进入脚本所在目录下执行脚本(/home/ansible/yoho-ansible-roles/scripts/switch)


cd /home/ansible/yoho-ansible-roles/scripts/switch
python center_switch.py --config=switch.ini