Fix RHEL not giving a number but '7Server'. Using ansible facts instead

pull/26/head
Werner Buck 9 years ago
parent 775e0c36ab
commit 57b999c184
  1. 4
      templates/nginx.repo.j2

@ -1,10 +1,10 @@
[nginx]
{% if nginx_install_redhat_branch == 'mainline' %}
name=nginx repo mainline
baseurl=http://nginx.org/packages/mainline/{% if ansible_distribution == 'CentOS' %}centos{% else %}rhel{% endif%}/$releasever/$basearch/
baseurl=http://nginx.org/packages/mainline/{% if ansible_distribution == 'CentOS' %}centos{% else %}rhel{% endif%}/{{ ansible_distribution_major_version }}/$basearch/
{% else %}
name=nginx repo stable
baseurl=http://nginx.org/packages/{% if ansible_distribution == 'CentOS' %}centos{% else %}rhel{% endif%}/$releasever/$basearch/
baseurl=http://nginx.org/packages/{% if ansible_distribution == 'CentOS' %}centos{% else %}rhel{% endif%}/{{ ansible_distribution_major_version }}/$basearch/
{% endif %}
gpgcheck=1
enabled=1