diff --git a/README.md b/README.md index 5274770..3b4070f 100644 --- a/README.md +++ b/README.md @@ -81,9 +81,9 @@ Set as the `proxy_cache_path` directive in the `nginx.conf` file. By default, th (For Debian/Ubuntu only) Allows you to set a different repository for the installation of Nginx. As an example, if you are running Debian's wheezy release, and want to get a newer version of Nginx, you can install the `wheezy-backports` repository and set that value here, and Ansible will use that as the `-t` option while installing Nginx. - nginx_el_install_mainline: yes + nginx_install_redhat_branch: stable -(For Centos/Rhel only) Defaults to no. If true, installs the mainline nginx repository. +(For Centos/RedHat only) Defaults to `stable`. Set to `mainline` to use the latest nginx mainline repository. ## Dependencies diff --git a/defaults/main.yml b/defaults/main.yml index 842537c..4684095 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,8 +1,8 @@ --- # Used only for Debian/Ubuntu installation, as the -t option for apt. nginx_default_release: "" -# Used only for RHEL/Centos installation. Set to true to install mainline -nginx_el_install_mainline: no +# Used only for RHEL/Centos installation. Set to "mainline" when wanting to use the latest nginx version +nginx_install_redhat_branch: stable # Used only for RHEL/Centos installation. Define the short gpg key id for nginx repo. # Here: https://pgp.mit.edu/pks/lookup?op=vindex&search=0xABF5BD827BD9BF62 nginx_el_repo_gpg_key: 7BD9BF62 diff --git a/templates/nginx.repo.j2 b/templates/nginx.repo.j2 index 20a17c4..2040cf9 100644 --- a/templates/nginx.repo.j2 +++ b/templates/nginx.repo.j2 @@ -1,5 +1,5 @@ [nginx] -{% if nginx_el_install_mainline %} +{% 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/ {% else %}