From b72263f7e5d59c3f0b519744c3ded2d8f5da239a Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Thu, 27 Jul 2017 14:56:43 +0200 Subject: [PATCH] Fix failures on travis --- Vagrantfile | 2 +- tasks/install_Debian.yml | 2 +- tests/includes/post_Debian.yml | 2 +- tests/test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 06fa9c0..0616601 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -22,7 +22,7 @@ Vagrant.configure("2") do |config| { :name => "docker-debian-jessie-backports", :docker => "hanxhx/vagrant-ansible:debian8", :vars => { "nginx_php56": true, "nginx_php70": false, "dotdeb": false, "nginx_backports": true }}, { :name => "docker-debian-jessie-dotdeb", :docker => "hanxhx/vagrant-ansible:debian8", :vars => { "nginx_php56": true, "nginx_php70": true, "dotdeb": true, "nginx_backports": false }}, { :name => "docker-debian-stretch", :docker => "hanxhx/vagrant-ansible:debian9", :vars => { "nginx_php56": false, "nginx_php70": true, "dotdeb": false, "nginx_backports": false }}, - { :name => "docker-debian-stretch-noht", :box => "debian/stretch64", :vars => { "nginx_php56": false, "nginx_php70": true, "dotdeb": false, "nginx_backports": false, nginx_htpasswd: [] }} + { :name => "docker-debian-stretch-noht", :docker => "hanxhx/vagrant-ansible:debian9", :vars => { "nginx_php56": false, "nginx_php70": true, "dotdeb": false, "nginx_backports": false, nginx_htpasswd: [] }} ] config.vm.network "private_network", type: "dhcp" diff --git a/tasks/install_Debian.yml b/tasks/install_Debian.yml index 961ba2b..2ec2057 100644 --- a/tasks/install_Debian.yml +++ b/tasks/install_Debian.yml @@ -4,7 +4,7 @@ fail: msg: "This ansible version ({{ ansible_version.full}}) is not compatible with your needs (Debian Stretch + htpasswd). Please see https://github.com/HanXHX/ansible-nginx/issues/28" when: - ansible_distribution_major_version >= 9 and + ansible_distribution_major_version | version_compare('9', 'ge') and ansible_version.full | version_compare('2.3.2', 'lt') and nginx_htpasswd | length > 0 diff --git a/tests/includes/post_Debian.yml b/tests/includes/post_Debian.yml index 6dad26a..79d7353 100644 --- a/tests/includes/post_Debian.yml +++ b/tests/includes/post_Debian.yml @@ -13,7 +13,7 @@ apt: pkg: nagios3 state: present - when: ansible_distribution_major_version < 9 + when: ansible_distribution_major_version | version_compare('9', 'lt') - name: SERVICE | Ensure backuppc is started service: name=backuppc state=started diff --git a/tests/test.yml b/tests/test.yml index dcbeb1e..b19bcc4 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -378,7 +378,7 @@ register: nagios_cgi failed_when: nagios_cgi.stdout.find('Nagios Event Summary') == -1 - when: ansible_distribution_major_version < 9 + when: ansible_distribution_major_version | version_compare('9', 'lt') # -------------------------------- # Owncloud