nginxinc / ansible-role-nginx

Ansible role for installing NGINX
https://galaxy.ansible.com/nginxinc/nginx
Apache License 2.0
644 stars 348 forks source link

its not possible to define `nginx_version` with `nginx_install_from: source` to pin the version #645

Closed olwe0002 closed 1 year ago

olwe0002 commented 1 year ago

Is your feature request related to a problem? Please describe

Here the version gets set to the latest one in the specified branch. Its not possible to set it on your own and pin the version.

Describe the solution you'd like

It should be possible to define nginx_version by your own. An easy way to achieve this would be to add a when: nginx_version is not defined to the ansible.builtin.set_fact task.

alessfg commented 1 year ago

Couple disclaimers before I get to my answer:

  1. Building NGINX from source is very much not recommended unless you really, really, really need to tweak the default NGINX binary provided by us. It's much easier and simpler to pull our latest mainline or stable build.
  2. Any effort done internally on this role re building NGINX from source or installing NGINX from any given distributions core repository is very much best effort, since it's not a method of installation we officially support. That being said, PRs are always more than welcome and will get reviewed! (Most of the core work done in supporting building NGINX from source has indeed come from external PRs.)

With that out of the way, this is a simple enough change that I think I can probably get around to it when my backlog allows.

alessfg commented 1 year ago

The role now has this functionality thanks to @MohamedLamineAllal in #661!