plone / ansible.plone_server

Ansible role to create a plone server
Other
9 stars 16 forks source link

Checking ansible version raises error #126

Closed oggers closed 4 years ago

oggers commented 6 years ago

I'm using ansible 2.6.1 and when I run this role (v 1.3.2) I get the following error:

The conditional check 'ansible_version is version('2.5.0', 'lt')' failed. The error was: Version comparison: '<' not supported between instances of 'str' and 'int'

Applying the following patch solves the problem:

--- main.yml.orig<----->2018-07-18 11:12:19.028597089 +0200
+++ main.yml<-->2018-07-18 10:40:43.634116606 +0200
@@ -2,7 +2,7 @@
.
 - name: Fail if Ansible is old
   fail: msg="We need updates in Ansible 2.5.0. Please update your kit. 'pip install -U Ansible'"
-  when: ansible_version is version('2.5.0', 'lt')
+  when: ansible_version.full is version('2.5.0', 'lt')
.
 - name: Fail if no plone initial password set
   fail: msg="You must set the plone_initial_password variable."

Hope you apply the patch asap. Thank you.

oggers commented 6 years ago

I have made a pull request with the patch.

stevepiercy commented 4 years ago

Closed by #134