Comments (11)
Thanks for creating this issue!
I think this is happening because all modules are installed using Ansible's package
module, but to work with NGINX in FreeBSD you need to use ports and the portinstall
module.
Let me do some further research and get back to you.
Cheers,
Alessandro.
from ansible-role-nginx.
So, on FreeBSD, when you install the default nginx
port you choose which modules to install when running make
. Doing this in an automated way is not trivial, with the best solution probably being to implement a way to create a build options file at runtime that then gets read when building the nginx
port.
Alternatively, for now, a workaround would be to manually modify the value at https://github.com/nginxinc/ansible-role-nginx/blob/master/tasks/opensource/install-oss.yml#L26 from nginx
to nginx-full
, and not enable modules on the role. The nginx-full
port builds pretty much all modules, which you should then be able to normally load from your NGINX configuration file.
from ansible-role-nginx.
since this role uses nginx packag from your repository, would it be possible get your repository to host all the binaries of plugins for a given os (eg freebsd, openbsd) and then the role would pull out of there?
Meaning that you would have to build it (using the ports tree, as you noted, but then host the resulting packages). This way individual users do not have to build it.
(sorry if I am misunderstanding this).
from ansible-role-nginx.
In FreeBSD the NGINX open source packages are hosted in the ports collection, and that's something that I do not foresee will change in the foreseeable future. There's some potential fixes, like I mentioned in the previous comment, but it'll take some time before a decision is made about how to best proceed.
from ansible-role-nginx.
ah, ok. I understand now. Basically for FreeBSD (and openBSD) this role, will actually build nginx on the target host.
from ansible-role-nginx.
Your workaround also should me to solve: uknown directive 'stream' error.
That I keep getting on FreeBSD 12.
Installing nginx-full on FreeBSD seems to be a requirement overall, because the 'stream' module is also not avialable in 'nginx' standard build (the stream module is assumed to be available in the role -- because it allows to specify stream_enable
option)
Unfortunately using nginx-full fails for me..
Found a package of 'www/nginx│
-full': /usr/ports/packages/All/nginx-full-1.16.0_2,2.txz (nginx-full-1.16.0_2,2)\n---> │
Located a package version 1.16.0_2,2 (/usr/ports/packages/All/nginx-full-1.16.0_2,2.txz│
)\n---> Installing 'nginx-full-1.16.0_2,2' from a package\n---> Installing the new ver│
sion via the package\nInstalling nginx-full-1.16.0_2,2...\r\npkg: Missing dependency 'Im│
ageMagick6'\r\n\r\nFailed to install the following 1 package(s): /usr/ports/packages/All│
/nginx-full-1.16.0_2,2.txz\r\n\t! www/nginx-full\t(pkg_add failed)\n"}
at this stage it seems that getting this work on FreeBSD is quite a bit beyond my skillset.
Will have to eliminate right now FreeBSD from the supported hosts for the system I am working on.
Thx for all your help sofar.
from ansible-role-nginx.
Sorry for all the trouble you are running into @vladp. FreeBSD support is still very much in an early development phase, so thanks for bearing with us!
That is a very interesting find indeed too, it may be worth changing the default port to nginx-full
in that case, at least for the time being.
from ansible-role-nginx.
Thank you, yes -- it seems that doing nginx-full for FreeBSD would solve lots of the module issues.
The trouble for me was that when building nginx-full from Ports, it seems that lots of packages needed to be installed prior to that port to build.
Normally FreeBSD would download recursively the source for packages it needed, but it did not (so first it was missing ImageMagick6, then when installed it using package module, it started complaining that apache24 needed to be installed... and so on).
Overall it meant that either package system was not working to figure out source dependencies, recursively... or something else. Plus, I realized, that nginx-full requires so many depedencies (including X system, wayland) -- that it would take hours if not a day to building nginx-full and resulting system (at least in my case would run out of space allocated for the target host).
Which is why, I thought, that if nginx-full was, indeed, needed -- it had to come from a binary package (eg using ' pkg install nginx-full
' from FreeBSD official binary package repol (or may be you repo in the future ) -- rather than building it.
from ansible-role-nginx.
Oh I see. Well, you can always install NGINX from FreeBSD's package repository, but it tends to be a couple versions behind mainline. Nonetheless (#87) also adds the option to choose between a ports or package install. Hopefully that should add more options.
from ansible-role-nginx.
Which is why, I thought, that if nginx-full was, indeed, needed -- it had to come from a binary package (eg using '
pkg install nginx-full
' from FreeBSD official binary package repol (or may be you repo in the future ) -- rather than building it.
FWIW. Use portinstall/portupgrade. This will install the dependencies and will use packages if available.
portinstall --upward-recursive --use-packages www/nginx-full
This role will install www/nginx by default. It can be configured to install www/nginx-full. For example:
- hosts: test_03
connection: ssh
remote_user: admin
become: yes
become_user: root
become_method: sudo
vars:
nginx_version: '-full'
# nginx_version: ''
nginx_debug_output: true
nginx_bsd_update_ports: false
nginx_bsd_install_packages: true
nginx_bsd_portinstall_use_packages: true
nginx_modules:
njs: false
perl: false
waf: false
geoip: false
image_filter: false
rtmp: false
xslt: false
roles:
- ansible-role-nginx
from ansible-role-nginx.
The latest release (0.13.0) should address this issue. Feel free to reopen the issue if it's still not working!
from ansible-role-nginx.
Related Issues (20)
- "(Handler) Print NGINX error if syntax check fails" always fails in check mode when nginx hasn't been installed yet HOT 2
- gpg-agent missing
- Support for RHEL 9
- Can't deploy Nginx role on a RHEL machine behind a proxy HOT 4
- Bug nginx_install_from: source (update zlib_version) HOT 1
- Is it possible to install nginx with streams without installing from source? HOT 1
- Unable to install NGINX on SLES (packagekit locks system management) HOT 3
- Mainline to stable apt repository switch is not managed correctly HOT 4
- Allow users to add a dynamic module during a build from source HOT 5
- its not possible to define `nginx_version` with `nginx_install_from: source` to pin the version HOT 2
- idempotency of `nginx_install_from: source`: current validations lack server reboot and ignore installed version HOT 1
- Error when installing the role from Ansible Galaxy: Unable to compare role versions HOT 4
- NGINX Amplify installation changes `agent.conf` even if it's already in the desired state
- Bug with lograte formating HOT 1
- SELinux set to permissive during role run HOT 1
- Incorrect role name in sample playbooks HOT 1
- Validation support for Ubuntu 24.04 (Noble) HOT 2
- Nginx will not install on FreeBSD
- Updated NGINX Signing Keys cause "Add NGINX signing key" task to fail HOT 3
- The specified fingerprint, '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62', does not match the key fingerprint '8540A6F18833A80E9C1653A42FD21310B49F6B46 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-role-nginx.