[root@harbor ansible-script]# ping www.baidu.com
ping: www.baidu.com: Name or service not known
1.cd /etc/sysconfig/network-scripts/
2,vim ifcfg-eth0
确定ONBOOT=”no”已设置为ONBOOT=”yes”
3, vim /etc/resolv.conf
nameserver 122.114.172.1(网关)
nameserver 8.8.8.8
nameserver 8.8.4.4