From befc656f310df46c674d9c919c462cd388c5db4b Mon Sep 17 00:00:00 2001 From: yuyicai Date: Thu, 2 Aug 2018 17:25:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3Ubuntu=2018.04?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=AE=89=E8=A3=85haproxy=E3=80=81keepalived?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/lb/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/lb/tasks/main.yml b/roles/lb/tasks/main.yml index 94162c6..51a6055 100644 --- a/roles/lb/tasks/main.yml +++ b/roles/lb/tasks/main.yml @@ -1,10 +1,10 @@ - name: apt更新缓存刷新 apt: update_cache=yes cache_valid_time=72000 - when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16" + when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int >= 16 - name: apt安装 haproxy apt: name=haproxy state=latest - when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16" + when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int >= 16 - name: yum安装 haproxy yum: name=haproxy state=latest @@ -22,7 +22,7 @@ - name: apt安装 keepalived apt: name=keepalived state=latest - when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16" + when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int >= 16 - name: yum安装 keepalived yum: name=keepalived state=latest