I had created these earlier in this branch before rebasing it on top of the Ansible 2.5.0 readiness branch. See: https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_2.5.html
28 lines
1.1 KiB
Django/Jinja
28 lines
1.1 KiB
Django/Jinja
# {{ ansible_managed }}
|
|
|
|
{% if ansible_distribution == 'Ubuntu' %}
|
|
{% if nginx_version == "stable" %}
|
|
{% if ansible_distribution_version is version_compare('18.04', '==') %}
|
|
# 2018-03-17: no Ubuntu 18.04 "bionic" packages yet, so use 17.10 "artful"
|
|
deb https://nginx.org/packages/ubuntu/ artful nginx
|
|
{% else %}
|
|
deb https://nginx.org/packages/ubuntu/ {{ ansible_distribution_release }} nginx
|
|
{% endif %}
|
|
{% elif nginx_version == "mainline" %}
|
|
{% if ansible_distribution_version is version_compare('18.04', '==') %}
|
|
# 2018-03-17: no Ubuntu 18.04 "bionic" packages yet, so use 17.10 "artful"
|
|
deb https://nginx.org/packages/mainline/ubuntu/ artful nginx
|
|
{% else %}
|
|
deb https://nginx.org/packages/mainline/ubuntu/ {{ ansible_distribution_release }} nginx
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if ansible_distribution == 'Debian' %}
|
|
{% if nginx_version == "stable" %}
|
|
deb https://nginx.org/packages/debian/ {{ ansible_distribution_release }} nginx
|
|
{% elif nginx_version == "mainline" %}
|
|
deb https://nginx.org/packages/mainline/debian/ {{ ansible_distribution_release }} nginx
|
|
{% endif %}
|
|
{% endif %}
|