roles/nginx: Fix logic error in apt sources template

This commit is contained in:
Alan Orth 2019-07-07 17:59:00 +03:00
parent 372eb26450
commit ca293289aa
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
1 changed files with 4 additions and 4 deletions

View File

@ -1,14 +1,14 @@
{{ ansible_managed | comment }}
{% if ansible_distribution == 'Ubuntu' %}
{% if nginx_version == "stable" %}
deb [arch=amd64] https://nginx.org/packages/ubuntu/ {{ ansible_distribution_release }} nginx
{% elif nginx_version == "mainline" %}
deb [arch=amd64] https://nginx.org/packages/mainline/ubuntu/ {{ ansible_distribution_release }} nginx
{% endif %}
{% endif %}
{% if ansible_distribution == 'Debian' and ansible_distribution_release == 'buster' %}
{% elif 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
@ -16,11 +16,11 @@ deb [arch=amd64] https://nginx.org/packages/debian/ stretch nginx
deb [arch=amd64] https://nginx.org/packages/mainline/debian/ stretch nginx
{% endif %}
{# else, distribution is not Debian buster #}
{% else %}
{% elif ansible_distribution == 'Debian' and ansible_distribution_release != 'buster' %}
{% if nginx_version == "stable" %}
deb [arch=amd64] https://nginx.org/packages/debian/ {{ ansible_distribution_release }} nginx
{% elif nginx_version == "mainline" %}
deb [arch=amd64] https://nginx.org/packages/mainline/debian/ {{ ansible_distribution_release }} nginx
{% endif %}
{% endif %}