Browse Source

Block upgrading w/ ansible v2.

Andrew Butcher 9 years ago
parent
commit
a79d25b64b

+ 4 - 0
playbooks/byo/openshift-cluster/upgrades/v3_0_minor/upgrade.yml

@@ -4,6 +4,10 @@
   become: no
   gather_facts: no
   tasks:
+  - name: Verify Ansible version is greater than or equal to 1.9.4 and less than 2.0
+    fail:
+      msg: "Unsupported ansible version: {{ ansible_version }} found."
+    when: ansible_version.full | version_compare('1.9.4', 'lt') or ansible_version.full | version_compare('2.0', 'ge')
   - include_vars: ../../../../byo/openshift-cluster/cluster_hosts.yml
   - add_host:
       name: "{{ item }}"

+ 4 - 0
playbooks/byo/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml

@@ -4,6 +4,10 @@
   become: no
   gather_facts: no
   tasks:
+  - name: Verify Ansible version is greater than or equal to 1.9.4 and less than 2.0
+    fail:
+      msg: "Unsupported ansible version: {{ ansible_version }} found."
+    when: ansible_version.full | version_compare('1.9.4', 'lt') or ansible_version.full | version_compare('2.0', 'ge')
   - include_vars: ../../../../byo/openshift-cluster/cluster_hosts.yml
   - add_host:
       name: "{{ item }}"

+ 4 - 0
playbooks/byo/openshift-cluster/upgrades/v3_1_minor/upgrade.yml

@@ -4,6 +4,10 @@
   become: no
   gather_facts: no
   tasks:
+  - name: Verify Ansible version is greater than or equal to 1.9.4 and less than 2.0
+    fail:
+      msg: "Unsupported ansible version: {{ ansible_version }} found."
+    when: ansible_version.full | version_compare('1.9.4', 'lt') or ansible_version.full | version_compare('2.0', 'ge')
   - include_vars: ../../../../byo/openshift-cluster/cluster_hosts.yml
   - add_host:
       name: "{{ item }}"

+ 4 - 0
playbooks/byo/openshift-cluster/upgrades/v3_1_to_v3_2/upgrade.yml

@@ -4,6 +4,10 @@
   become: no
   gather_facts: no
   tasks:
+  - name: Verify Ansible version is greater than or equal to 1.9.4 and less than 2.0
+    fail:
+      msg: "Unsupported ansible version: {{ ansible_version }} found."
+    when: ansible_version.full | version_compare('1.9.4', 'lt') or ansible_version.full | version_compare('2.0', 'ge')
   - include_vars: ../../../../byo/openshift-cluster/cluster_hosts.yml
   - add_host:
       name: "{{ item }}"

+ 2 - 1
playbooks/common/openshift-cluster/upgrades/v3_0_minor/upgrade.yml

@@ -36,7 +36,8 @@
 - name: Ensure AOS 3.0.2 or Origin 1.0.6
   hosts: oo_first_master
   tasks:
-    fail: This playbook requires Origin 1.0.6 or Atomic OpenShift 3.0.2 or later
+  - fail:
+      msg: "This playbook requires Origin 1.0.6 or Atomic OpenShift 3.0.2 or later"
     when: _new_version.stdout | version_compare('1.0.6','<') or ( _new_version.stdout | version_compare('3.0','>=' and _new_version.stdout | version_compare('3.0.2','<') )
 
 - name: Update cluster policy