ansible+heartbeatV2构建高可用群集
# ansible web -m yum -a 'name=httpd state=present'# ansible web -a 'service httpd start'
192.168.1.130 | success | rc=0 >>
Starting httpd: httpd: apr_sockaddr_info_get() failed for CentOS
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
192.168.1.120 | success | rc=0 >>
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
# touch index.html
# echo heartbeatV2 > index.html
# scp index.html root@192.168.1.130:/var/www/html/
index.html 100% 16 0.0KB/s 00:00
# scp index.html root@192.168.1.120:/var/www/html/
index.html 100% 16 0.0KB/s 00:00
页:
[1]