roles/nginx: Use Debian 9 "stretch" builds on Debian 10 "buster"

There are no Debian 10 "buster" builds from nginx.org yet.
This commit is contained in:
Alan Orth 2019-07-05 20:54:37 +03:00
parent 39622077cd
commit 619f536cd8

View File

@ -8,7 +8,16 @@ deb [arch=amd64] https://nginx.org/packages/mainline/ubuntu/ {{ ansible_distribu
{% endif %}
{% endif %}
{% if ansible_distribution == 'Debian' %}
{% if ansible_distribution == 'Debian' and ansible_distribution_release == 'buster' %}
# there are no tarsnap packages for Debian 10 "buster" yet, so use Debian 9's
{% if nginx_version == "stable" %}
deb [arch=amd64] https://nginx.org/packages/debian/ stretch nginx
{% elif nginx_version == "mainline" %}
deb [arch=amd64] https://nginx.org/packages/mainline/debian/ stretch nginx
{% endif %}
{# else, distribution is not Debian buster #}
{% else %}
{% if nginx_version == "stable" %}
deb [arch=amd64] https://nginx.org/packages/debian/ {{ ansible_distribution_release }} nginx
{% elif nginx_version == "mainline" %}