From e818b9287a00302c6cfb0181eafd4f5be2afb53b Mon Sep 17 00:00:00 2001 From: gjmzj Date: Thu, 13 Dec 2018 16:43:30 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=89=B9=E5=AE=9A=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E4=B8=8Blb=E8=8A=82=E7=82=B9=E5=8F=98=E9=87=8FLB=5FIF=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=AE=BE=E7=BD=AE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/lb/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/lb/tasks/main.yml b/roles/lb/tasks/main.yml index 2bcc886..7361fe6 100644 --- a/roles/lb/tasks/main.yml +++ b/roles/lb/tasks/main.yml @@ -1,6 +1,6 @@ # 自动设置LB节点变量'LB_IF' - name: 注册变量 LB_IF_TMP - shell: "ip a|grep '{{ inventory_hostname }}/'|awk '{print $7}'" + shell: "ip a|grep '{{ inventory_hostname }}/'|awk '{print $NF}'" register: LB_IF_TMP - name: 设置变量 LB_IF