diff options
author | Andrew Butcher <abutcher@redhat.com> | 2016-07-20 14:09:23 -0400 |
---|---|---|
committer | Andrew Butcher <abutcher@redhat.com> | 2016-07-20 15:59:57 -0400 |
commit | c3c88fb35f8f8541b066b6a25f976e53b1813d1d (patch) | |
tree | 2f5e6f1f3cde0e7cbdc1360c5180a23811dac554 | |
parent | a7e6148bb5c5fa9746de5c351a6b0a4d065d82d4 (diff) | |
download | openshift-c3c88fb35f8f8541b066b6a25f976e53b1813d1d.tar.gz openshift-c3c88fb35f8f8541b066b6a25f976e53b1813d1d.tar.bz2 openshift-c3c88fb35f8f8541b066b6a25f976e53b1813d1d.tar.xz openshift-c3c88fb35f8f8541b066b6a25f976e53b1813d1d.zip |
Check ansible version prior to evaluating cluster hosts and groups.
-rw-r--r-- | playbooks/aws/openshift-cluster/config.yml | 3 | ||||
-rw-r--r-- | playbooks/byo/openshift-cluster/config.yml | 2 | ||||
-rw-r--r-- | playbooks/byo/openshift-cluster/upgrades/v3_2/upgrade.yml | 2 | ||||
-rw-r--r-- | playbooks/byo/openshift_facts.yml | 2 | ||||
-rw-r--r-- | playbooks/common/openshift-cluster/verify_ansible_version.yml | 10 | ||||
-rw-r--r-- | playbooks/libvirt/openshift-cluster/config.yml | 3 | ||||
-rw-r--r-- | playbooks/openstack/openshift-cluster/config.yml | 2 | ||||
-rw-r--r-- | roles/openshift_facts/tasks/main.yml | 5 |
8 files changed, 24 insertions, 5 deletions
diff --git a/playbooks/aws/openshift-cluster/config.yml b/playbooks/aws/openshift-cluster/config.yml index d6b5700b0..647c72239 100644 --- a/playbooks/aws/openshift-cluster/config.yml +++ b/playbooks/aws/openshift-cluster/config.yml @@ -1,3 +1,6 @@ +--- +- include: ../../common/openshift-cluster/verify_ansible_version.yml + - hosts: localhost gather_facts: no tasks: diff --git a/playbooks/byo/openshift-cluster/config.yml b/playbooks/byo/openshift-cluster/config.yml index 3477b2dc4..0a931fbe0 100644 --- a/playbooks/byo/openshift-cluster/config.yml +++ b/playbooks/byo/openshift-cluster/config.yml @@ -1,4 +1,6 @@ --- +- include: ../../common/openshift-cluster/verify_ansible_version.yml + - hosts: localhost connection: local become: no diff --git a/playbooks/byo/openshift-cluster/upgrades/v3_2/upgrade.yml b/playbooks/byo/openshift-cluster/upgrades/v3_2/upgrade.yml index 8c89e118e..ddb5ef911 100644 --- a/playbooks/byo/openshift-cluster/upgrades/v3_2/upgrade.yml +++ b/playbooks/byo/openshift-cluster/upgrades/v3_2/upgrade.yml @@ -1,4 +1,6 @@ --- +- include: ../../common/openshift-cluster/verify_ansible_version.yml + - hosts: localhost connection: local become: no diff --git a/playbooks/byo/openshift_facts.yml b/playbooks/byo/openshift_facts.yml index db8703db6..d966b58fd 100644 --- a/playbooks/byo/openshift_facts.yml +++ b/playbooks/byo/openshift_facts.yml @@ -1,4 +1,6 @@ --- +- include: ../common/openshift-cluster/verify_ansible_version.yml + - hosts: localhost connection: local become: no diff --git a/playbooks/common/openshift-cluster/verify_ansible_version.yml b/playbooks/common/openshift-cluster/verify_ansible_version.yml new file mode 100644 index 000000000..2a143b065 --- /dev/null +++ b/playbooks/common/openshift-cluster/verify_ansible_version.yml @@ -0,0 +1,10 @@ +--- +- hosts: localhost + connection: local + become: no + gather_facts: no + tasks: + - name: Verify Ansible version is greater than or equal to 2.1.0.0 + fail: + msg: "Unsupported ansible version: {{ ansible_version.full }} found" + when: not ansible_version.full | version_compare('2.1.0.0', 'ge') diff --git a/playbooks/libvirt/openshift-cluster/config.yml b/playbooks/libvirt/openshift-cluster/config.yml index a28e59a87..299325fc4 100644 --- a/playbooks/libvirt/openshift-cluster/config.yml +++ b/playbooks/libvirt/openshift-cluster/config.yml @@ -2,6 +2,9 @@ # TODO: need to figure out a plan for setting hostname, currently the default # is localhost, so no hostname value (or public_hostname) value is getting # assigned + +- include: ../../common/openshift-cluster/verify_ansible_version.yml + - hosts: localhost gather_facts: no tasks: diff --git a/playbooks/openstack/openshift-cluster/config.yml b/playbooks/openstack/openshift-cluster/config.yml index 1366c83ca..f6550b2c4 100644 --- a/playbooks/openstack/openshift-cluster/config.yml +++ b/playbooks/openstack/openshift-cluster/config.yml @@ -1,4 +1,6 @@ --- +- include: ../../common/openshift-cluster/verify_ansible_version.yml + - hosts: localhost gather_facts: no tasks: diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml index 2aca35ce1..4dbbd7f45 100644 --- a/roles/openshift_facts/tasks/main.yml +++ b/roles/openshift_facts/tasks/main.yml @@ -1,9 +1,4 @@ --- -- name: Verify Ansible version is greater than or equal to 2.1.0.0 - fail: - msg: "Unsupported ansible version: {{ ansible_version.full }} found" - when: not ansible_version.full | version_compare('2.1.0.0', 'ge') - - name: Detecting Operating System stat: path: /run/ostree-booted |