From f62454199f6fa5c51a6c6c927cbdb32d11c45c6f Mon Sep 17 00:00:00 2001 From: jmgao Date: Thu, 14 Dec 2017 23:18:57 +0800 Subject: [PATCH] small fix --- roles/docker/tasks/main.yml | 4 ++-- roles/lb/tasks/main.yml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index 74ffbaf..2a86862 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -32,12 +32,12 @@ ## 可选 ------安装docker查询镜像 tag的小工具---- - name: 安装轻量JSON处理程序 apt: name=jq state=latest - when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version = "16" + when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16" tags: docker-tag - name: 安装轻量JSON处理程序 yum: name=jq state=latest - when: ansible_distribution == "CentOS" and ansible_distribution_major_version = "7" + when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" tags: docker-tag - name: 下载 docker-tag diff --git a/roles/lb/tasks/main.yml b/roles/lb/tasks/main.yml index 2c531e6..ab30255 100644 --- a/roles/lb/tasks/main.yml +++ b/roles/lb/tasks/main.yml @@ -1,15 +1,15 @@ # - 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 == "16" - name: 安装 haproxy using apt apt: name=haproxy state=latest - when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version = "16" + when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16" - name: 安装 haproxy using yum yum: name=haproxy state=latest - when: ansible_distribution == "CentOS" and ansible_distribution_major_version = "7" + when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" - name: 创建haproxy配置目录 file: name=/etc/haproxy state=directory @@ -19,11 +19,11 @@ - name: 安装 keepalived using apt apt: name=keepalived state=latest - when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version = "16" + when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16" - name: 安装 keepalived using yum yum: name=keepalived state=latest - when: ansible_distribution == "CentOS" and ansible_distribution_major_version = "7" + when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" - name: 创建keepalived配置目录 file: name=/etc/keepalived state=directory