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