roles/nginx: Use template for nginx repo

A template is better than ansible's `apt_repository` module because
we can idempotently control the contents of the file based on vari-
ables.

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
2015-05-25 00:15:49 +03:00
parent aa5a9f5dd8
commit 3746e798b6
3 changed files with 11 additions and 6 deletions

View File

@ -0,0 +1,5 @@
{% if nginx_version == "stable" %}
deb http://nginx.org/packages/ubuntu/ {{ ansible_distribution_release }} nginx
{% elif nginx_version == "mainline" %}
deb http://nginx.org/packages/mainline/ubuntu/ {{ ansible_distribution_release }} nginx
{% endif %}