From ce5a34d86c01cab82f145621ce2efb2bb29b7df1 Mon Sep 17 00:00:00 2001
From: Wong Hoi Sing Edison <hswong3i@gmail.com>
Date: Wed, 31 Oct 2018 18:01:19 +0800
Subject: [PATCH] ansible: Upgrade to 2.7.1 (#3618)

Only exclude buggy Ansible v2.7.0 (https://github.com/ansible/ansible/issues/46600#issuecomment-433863628)

Fixup #3589
---
 cluster.yml         | 4 ++--
 remove-node.yml     | 2 +-
 requirements.txt    | 2 +-
 reset.yml           | 4 ++--
 scale.yml           | 4 ++--
 upgrade-cluster.yml | 4 ++--
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/cluster.yml b/cluster.yml
index 3b6297c5a..649f6549f 100644
--- a/cluster.yml
+++ b/cluster.yml
@@ -1,11 +1,11 @@
 ---
 - hosts: localhost
   tasks:
-    - name: Check ansible version <2.7
+    - name: "Check ansible version !=2.7.0"
       assert:
         msg: "Ansible V2.7.0 can't be used until: https://github.com/ansible/ansible/issues/46600 is fixed"
         that:
-          - ansible_version.string is version("2.7.0", "<")
+          - ansible_version.string is version("2.7.0", "!=")
           - ansible_version.string is version("2.5.0", ">=")
       tags:
         - check
diff --git a/remove-node.yml b/remove-node.yml
index aceed33ac..2b2dacbab 100644
--- a/remove-node.yml
+++ b/remove-node.yml
@@ -1,7 +1,7 @@
 ---
 - hosts: localhost
   tasks:
-    - name: Check ansible version <2.7
+    - name: "Check ansible version !=2.7.0"
       assert:
         msg: "Ansible V2.7.0 can't be used until: https://github.com/ansible/ansible/issues/46600 is fixed"
         that:
diff --git a/requirements.txt b/requirements.txt
index fed7afe50..1e3300434 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
-ansible>=2.5.0,<2.7
+ansible>=2.5.0,!=2.7.0
 jinja2>=2.9.6
 netaddr
 pbr>=1.6
diff --git a/reset.yml b/reset.yml
index de47fafca..a416dd7ee 100644
--- a/reset.yml
+++ b/reset.yml
@@ -1,11 +1,11 @@
 ---
 - hosts: localhost
   tasks:
-    - name: Check ansible version <2.7
+    - name: "Check ansible version !=2.7.0"
       assert:
         msg: "Ansible V2.7.0 can't be used until: https://github.com/ansible/ansible/issues/46600 is fixed"
         that:
-          - ansible_version.string is version("2.7.0", "<")
+          - ansible_version.string is version("2.7.0", "!=")
           - ansible_version.string is version("2.5.0", ">=")
       tags:
         - check
diff --git a/scale.yml b/scale.yml
index 1be060ce3..2dc55eceb 100644
--- a/scale.yml
+++ b/scale.yml
@@ -1,11 +1,11 @@
 ---
 - hosts: localhost
   tasks:
-    - name: Check ansible version <2.7
+    - name: "Check ansible version !=2.7.0"
       assert:
         msg: "Ansible V2.7.0 can't be used until: https://github.com/ansible/ansible/issues/46600 is fixed"
         that:
-          - ansible_version.string is version("2.7.0", "<")
+          - ansible_version.string is version("2.7.0", "!=")
           - ansible_version.string is version("2.5.0", ">=")
       tags:
         - check
diff --git a/upgrade-cluster.yml b/upgrade-cluster.yml
index 8397341f4..27d427023 100644
--- a/upgrade-cluster.yml
+++ b/upgrade-cluster.yml
@@ -1,11 +1,11 @@
 ---
 - hosts: localhost
   tasks:
-    - name: Check ansible version <2.7
+    - name: "Check ansible version !=2.7.0"
       assert:
         msg: "Ansible V2.7.0 can't be used until: https://github.com/ansible/ansible/issues/46600 is fixed"
         that:
-          - ansible_version.string is version("2.7.0", "<")
+          - ansible_version.string is version("2.7.0", "!=")
           - ansible_version.string is version("2.5.0", ">=")
       tags:
         - check
-- 
GitLab