Commit d6072466 by tingweiwang

flannel采用正则

1 parent e7615518
Showing with 3 additions and 3 deletions
......@@ -11,7 +11,7 @@ harbor_host=192.168.1.32:5000
harbor_passwd=admin #写死的不能改,harbor配置文件中password写死了,当前只能是admin
harbor_user=admin
image_path=/root/images #写死的不能改
interface=eno1 #本机内网IP的物理网卡名称,用于flannel的配置。
interface='eth*|enp*|eno*|ens*' #本机内网IP的物理网卡名称,用于flannel的配置。
image_list=`cat $image_path/image_list.txt`
image_list_ksy=`cat $image_path/image_list_ksy.txt`
host_name=`hostname`
......@@ -203,8 +203,8 @@ cat >>/opt/kubernetes/cfg/flanneld<<EOF
FLANNEL_OPTIONS="--etcd-endpoints=https://$etcd_ip:2379 \\
-etcd-cafile=/opt/kubernetes/ssl/ca.pem \\
-etcd-certfile=/opt/kubernetes/ssl/etcd.pem \\
-etcd-keyfile=/opt/kubernetes/ssl/etcd-key.pem \\
--iface=$interface"
--iface-regex=$interface \\
-etcd-keyfile=/opt/kubernetes/ssl/etcd-key.pem"
EOF
ansible master -m copy -a "src=/opt/kubernetes/cfg/flanneld dest=/opt/kubernetes/cfg/ mode=755"
cp /root/k8s/service/flanneld.service /lib/systemd/system/
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!