Comments (6)
It's looks like an Ansible bug.
You can define manually this variable to compensate : nginx_worker_processes
from ansible-role-nginx.
yeah thats what I did as a workaround, ans this was reported as a bug before ans supposedly fixed(I'll paste the ghi for reference later, on mobile now)
but in any case not an issue on you're side so I guess it can be closed
from ansible-role-nginx.
here:
ansible/ansible#9008
It seems the fix was reverted cause it was causing more issues, I wonder if this just affects FreeBSD or all DigitalOcean vms, If I have time I might take a peak at the code that gets this value, anyway for now I'll just edit the role and define the var to a default of "1" and increase in the playbooks if needed.
from ansible-role-nginx.
Came to this from the referenced issue, FYI the root cause isn't due to an Ansible bug, though the expected output may be. You're trying to use a variable that doesn't exist. Variables can be guarded using the default() filter, and given that facts might not be available it's probably best to do so. You could either default(1) or guard against it in the template. I'd use nginx_worker_processes: "{{ ansible_processor_vcpus|default(None) }}" then use {% if nginx_worker_processes %} block in the template.
from ansible-role-nginx.
@nowayride Ok thanks, don't hesitate to submit a PR
from ansible-role-nginx.
@nowayride that sounds 100% correct.
But I'd like to add that this fact should be present on FreeBSD, I was actually looking into the code a couple of days ago but then other stuff came up, the code is just doing it wrong for FreeBSD... its looking in dmesg for string that are not present / don't reflect the cpu/threads info, or maybe it was in older versions... anyway if I get some time tomorrow I'll poke around more... looking for "SMP" in dmesg would work.
I.E.
% dmesg | grep SMP
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 SMT threads
But anyway you're point is still pretty valid for any "fact"
from ansible-role-nginx.
Related Issues (20)
- Add installation from sources HOT 1
- remove a site is not taken in consideration HOT 2
- Ansible error HOT 1
- Change nginx user HOT 4
- disable default config HOT 5
- Error in handlers/main.yml HOT 1
- issue when adding header parameter with ";" HOT 1
- Does this role need run as root? HOT 1
- amplify.api_key variable does not exist HOT 1
- add_header X-XSS-Protection is causing problems HOT 2
- Nginx didn't start on install
- v2.16 missing on https://galaxy.ansible.com/jdauphant/nginx HOT 1
- Warning, Duplicate When Key HOT 5
- Allow for no default config to be generated HOT 3
- Configuring modules is currently limited to Centos/RHEL only HOT 1
- Missing mime.types file plus /etc/mime.types idea HOT 2
- Adhere to ansible-lint rules HOT 2
- Travis job is still on python 2.7 HOT 2
- Debian 12 (python3) support
- version > v2.21.2 are not avaiable via ansible-galaxy install command
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.