Install ansible
Create corosync directory
Mkdir-PV/corosync/roles/{common, Ha}/{files, tasks, handlers, templates, vars, Meta, default}
Edit/common/files/hosts
650) This. width = 650; "style =" border-right-0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px "Title =" clip_image002 "border =" 0 "alt =" clip_image002 "src =" http://img1.51cto.com/attachment/201409/14/8914310_1410702725AwvO.jpg "width =" 244 "Height =" 33 "/>
Define common and task tasks
650) This. width = 650; "style =" border-right-0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px "Title =" clip_image004 "border =" 0 "alt =" clip_image004 "src =" http://img1.51cto.com/attachment/201409/14/8914310_14107027254bsr.jpg "width =" 244 "Height =" 13 "/>
650) This. width = 650; "style =" border-right-0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px "Title =" clip_image006 "border =" 0 "alt =" clip_image006 "src =" http://img1.51cto.com/attachment/201409/14/8914310_1410702726MNJS.jpg "width =" 244 "Height =" 42 "/>
Define common
Define ha
# Vim/roles/HA/tasks/Main. yaml
650) This. width = 650; "style =" border-right-0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px "Title =" clip_image008 "border =" 0 "alt =" clip_image008 "src =" http://img1.51cto.com/attachment/201409/14/8914310_1410702726M0Qe.jpg "width =" 244 "Height =" 119 "/>
Define handlers
# Vim/roles/HA/handlers/Main. yaml
650) This. width = 650; "style =" border-right-0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px "Title =" clip_image010 "border =" 0 "alt =" clip_image010 "src =" http://img1.51cto.com/attachment/201409/14/8914310_1410702726BqjF.jpg "width =" 244 "Height =" 36 "/>
# Touch/corosync/site. yaml
# Vim/corosync/ha. yaml
650) This. width = 650; "style =" border-right-0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px "Title =" clip_image012 "border =" 0 "alt =" clip_image012 "src =" http://img1.51cto.com/attachment/201409/14/8914310_1410702726qiiG.jpg "width =" 244 "Height =" 100 "/>
Define/etc/ansible/hosts
650) This. width = 650; "style =" border-right-0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px "Title =" clip_image014 "border =" 0 "alt =" clip_image014 "src =" http://img1.51cto.com/attachment/201409/14/8914310_1410702726Kqpq.jpg "width =" 244 "Height =" 47 "/>
After completion, define crmsh to put the crmsh RPM package under files.
650) This. width = 650; "style =" border-right-0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px "Title =" clip_image016 "border =" 0 "alt =" clip_image016 "src =" http://img1.51cto.com/attachment/201409/14/8914310_14107027274O64.jpg "width =" 244 "Height =" 25 "/>
Then define main. yml under tasks
650) This. width = 650; "style =" border-right-0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px "Title =" clip_image018 "border =" 0 "alt =" clip_image018 "src =" http://img1.51cto.com/attachment/201409/14/8914310_14107027289qGd.jpg "width =" 244 "Height =" 129 "/>
Use ansible to deploy and install corosync + pacemaker