Elegent fail for htpasswd+stretch (#28 related)

pull/35/head
Emilien Mantel 2017-07-27 11:50:48 +02:00
parent adf53b0d95
commit 50e25d45b8
4 changed files with 17 additions and 3 deletions

View File

@ -2,15 +2,15 @@ env:
- PLATFORM='docker-debian-jessie' ANSIBLE_VERSION='ansible>=2.2,<2.3' - PLATFORM='docker-debian-jessie' ANSIBLE_VERSION='ansible>=2.2,<2.3'
- PLATFORM='docker-debian-jessie-backports' ANSIBLE_VERSION='ansible>=2.2,<2.3' - PLATFORM='docker-debian-jessie-backports' ANSIBLE_VERSION='ansible>=2.2,<2.3'
- PLATFORM='docker-debian-jessie-dotdeb' ANSIBLE_VERSION='ansible>=2.2,<2.3' - PLATFORM='docker-debian-jessie-dotdeb' ANSIBLE_VERSION='ansible>=2.2,<2.3'
- PLATFORM='docker-debian-stretch' ANSIBLE_VERSION='ansible>=2.2,<2.3' - PLATFORM='docker-debian-stretch-noht' ANSIBLE_VERSION='ansible>=2.2,<2.3'
- PLATFORM='docker-debian-jessie' ANSIBLE_VERSION='ansible>=2.3,<2.4' - PLATFORM='docker-debian-jessie' ANSIBLE_VERSION='ansible>=2.3,<2.4'
- PLATFORM='docker-debian-jessie-backports' ANSIBLE_VERSION='ansible>=2.3,<2.4' - PLATFORM='docker-debian-jessie-backports' ANSIBLE_VERSION='ansible>=2.3,<2.4'
- PLATFORM='docker-debian-jessie-dotdeb' ANSIBLE_VERSION='ansible>=2.3,<2.4' - PLATFORM='docker-debian-jessie-dotdeb' ANSIBLE_VERSION='ansible>=2.3,<2.4'
- PLATFORM='docker-debian-stretch' ANSIBLE_VERSION='ansible>=2.3,<2.4' - PLATFORM='docker-debian-stretch' ANSIBLE_VERSION='ansible>=2.3,<2.4'
- PLATFORM='docker-debian-stretch-noht' ANSIBLE_VERSION='ansible>=2.3,<2.4'
matrix: matrix:
allow_failures: allow_failures:
- env: PLATFORM='docker-debian-stretch' ANSIBLE_VERSION='ansible>=2.2,<2.3'
- env: PLATFORM='docker-debian-stretch' ANSIBLE_VERSION='ansible>=2.3,<2.4' - env: PLATFORM='docker-debian-stretch' ANSIBLE_VERSION='ansible>=2.3,<2.4'
fast_finish: true fast_finish: true

3
Vagrantfile vendored
View File

@ -9,7 +9,8 @@ Vagrant.configure("2") do |config|
{ :name => "debian-jessie", :box => "debian/jessie64", :vars => { "nginx_php56": true, "nginx_php70": false, "dotdeb": false, "nginx_backports": false }}, { :name => "debian-jessie", :box => "debian/jessie64", :vars => { "nginx_php56": true, "nginx_php70": false, "dotdeb": false, "nginx_backports": false }},
{ :name => "debian-jessie-backports", :box => "debian/jessie64", :vars => { "nginx_php56": true, "nginx_php70": false, "dotdeb": false, "nginx_backports": true }}, { :name => "debian-jessie-backports", :box => "debian/jessie64", :vars => { "nginx_php56": true, "nginx_php70": false, "dotdeb": false, "nginx_backports": true }},
{ :name => "debian-jessie-dotdeb", :box => "debian/jessie64", :vars => { "nginx_php56": true, "nginx_php70": true, "dotdeb": true, "nginx_backports": false }}, { :name => "debian-jessie-dotdeb", :box => "debian/jessie64", :vars => { "nginx_php56": true, "nginx_php70": true, "dotdeb": true, "nginx_backports": false }},
{ :name => "debian-stretch", :box => "debian/stretch64", :vars => { "nginx_php56": false, "nginx_php70": true, "dotdeb": false, "nginx_backports": false }} { :name => "debian-stretch", :box => "debian/stretch64", :vars => { "nginx_php56": false, "nginx_php70": true, "dotdeb": false, "nginx_backports": false }},
{ :name => "debian-stretch-noht", :box => "debian/stretch64", :vars => { "nginx_php56": false, "nginx_php70": true, "dotdeb": false, "nginx_backports": false, nginx_htpasswd: [] }}
] ]
vms_freebsd = [ vms_freebsd = [

View File

@ -1,6 +1,11 @@
Auth Basic management Auth Basic management
===================== =====================
IMPORTANT
---------
If you use this feature with Debian Stretch, you *MUST* use ansible >= 2.3.2! See: [https://github.com/HanXHX/ansible-nginx/issues/28](#28).
Description Description
----------- -----------

View File

@ -1,5 +1,13 @@
--- ---
- name: FAIL | Check possible issues
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_version.full | version_compare('2.3.2', 'lt') and
nginx_htpasswd | length > 0
- name: APT | Update cache - name: APT | Update cache
apt: > apt: >
update_cache=yes update_cache=yes