Skip to content

Commit 8f5aa8f

Browse files
committed
Merge pull request #6 from alphagov/uwsgi-graphite-extraopts
Add uwsgi_graphite_extraopts to configure uwsgi
2 parents 2ed6e29 + 8094375 commit 8f5aa8f

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@ server {
2424
}
2525
```
2626

27+
Alternatively, you can define `uwsgi_graphite_extraopts` with additional uwsgi configuration, which can e.g. enable http on port 8080 or add basic auth:
28+
```yaml
29+
uwsgi_graphite_extraopts:
30+
- option: http
31+
value: "{{ ansible_default_ipv4.address }}:8080"
32+
- option: plugins
33+
value: router_basicauth
34+
- option: route
35+
value: "^/ basicauth:myRealm,foo:bar"
36+
```
37+
2738
Role Variables
2839
--------------
2940

defaults/main.yml

+3
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,6 @@ graphite_aggregator_use_flow_control: true
9696
graphite_aggregator_use_whitelist: false
9797
#graphite_aggregator_user:
9898
graphite_aggregator_write_back_frequency: 0
99+
100+
# Optional extra options for uwsgi_graphite.ini
101+
uwsgi_graphite_extraopts: []

templates/uwsgi_graphite.ini.j2

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ module = wsgi:application
88
{% if ansible_os_family == "RedHat" %}
99
pidfile = /run/uwsgi/graphite/pid
1010
{% endif %}
11+
{% for opts in uwsgi_graphite_extraopts %}
12+
{{ opts.option }}={{ opts.value }}
13+
{% endfor %}

0 commit comments

Comments
 (0)