Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow users to add a dynamic module during a build from source #640

Open
alessfg opened this issue Aug 7, 2023 Discussed in #638 · 5 comments
Open

Allow users to add a dynamic module during a build from source #640

alessfg opened this issue Aug 7, 2023 Discussed in #638 · 5 comments
Labels
enhancement Enhance/improve an existing feature

Comments

@alessfg
Copy link
Collaborator

alessfg commented Aug 7, 2023

Discussed in #638

Originally posted by tibz7 August 3, 2023
Is there a way to use this role and install geoip2 for the opensource version?
Something like using the source and passing compilation flags?
Otherwise the only option i thought of was to not use this role and write my own tasks to compile it with the needed module.

@alessfg alessfg changed the title Allow users add a dynamic module during a build from source Allow users to add a dynamic module during a build from source Aug 7, 2023
@alessfg alessfg added the feature label Aug 7, 2023
@olwe0002
Copy link

Hi alessfg,

try

nginx_install_from: source
nginx_static_modules: [http_ssl_module,http_geoip2_module]

@alessfg
Copy link
Collaborator Author

alessfg commented Aug 28, 2023

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.

@tibz7
Copy link

tibz7 commented Nov 20, 2023

Hello, any progress on this?

@alessfg
Copy link
Collaborator Author

alessfg commented Nov 20, 2023

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!

@oxpa
Copy link

oxpa commented Nov 20, 2023

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 :)

@alessfg alessfg added enhancement Enhance/improve an existing feature and removed feature labels Nov 20, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement Enhance/improve an existing feature
Projects
Development

No branches or pull requests

4 participants