Open alessfg opened 1 year ago
Hi alessfg,
try
nginx_install_from: source
nginx_static_modules: [http_ssl_module,http_geoip2_module]
That parameter is used for NGINX modules following the --with
pattern listed here http://nginx.org/en/docs/configure.html and given the open source geoip2
module is considered an external module, you would have to use --add-module=...
or --add-dynamic-module=...
instead.
Hello, any progress on this?
Not really, no. Building from source is not recommended and as such building from source options are what we consider a "community" developed feature. This does not mean that it will not get worked on, but any other active issue and/or PR is affecting any other feature of the role is prioritized.
PRs are always welcome!
I'm not sure if Ansible (which is a configuration management tool?) is the best solution for a build automation. Nginx offers pkg-oss "framework": http://hg.nginx.org/pkg-oss . With it you can build nginx and any module with, like, 3 commands:
hg clone http://hg.nginx.org/pkg-oss
cd pkg-oss/$os_flavor
make base module-geoip2
You can swap hg
for git
if you have proper git module installed.
It doesn't get much easier than that.
And if you need a module which is not in the list of provided "examples" - you can use build_module.sh which will write a stub makefile for you.
And instead of just putting some binaries somewhere (good luck accounting those) you'll have proper OS specific packages which are way easier to maintain.
Is it really worth maintaining 10 different ways of doing the same in a worse way?..
And you can ask for help with pkg-oss in a community slack, IRC channel or mailing lists (if you are like really, really old. Like my age maybe :)
Discussed in https://github.com/nginxinc/ansible-role-nginx/discussions/638