Skip to content

Commit

Permalink
Merge pull request #6 from alphagov/uwsgi-graphite-extraopts
Browse files Browse the repository at this point in the history
Add uwsgi_graphite_extraopts to configure uwsgi
  • Loading branch information
nsg committed Sep 27, 2015
2 parents 2ed6e29 + 8094375 commit 8f5aa8f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ server {
}
```

Alternatively, you can define `uwsgi_graphite_extraopts` with additional uwsgi configuration, which can e.g. enable http on port 8080 or add basic auth:
```yaml
uwsgi_graphite_extraopts:
- option: http
value: "{{ ansible_default_ipv4.address }}:8080"
- option: plugins
value: router_basicauth
- option: route
value: "^/ basicauth:myRealm,foo:bar"
```

Role Variables
--------------

Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,6 @@ graphite_aggregator_use_flow_control: true
graphite_aggregator_use_whitelist: false
#graphite_aggregator_user:
graphite_aggregator_write_back_frequency: 0

# Optional extra options for uwsgi_graphite.ini
uwsgi_graphite_extraopts: []
3 changes: 3 additions & 0 deletions templates/uwsgi_graphite.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ module = wsgi:application
{% if ansible_os_family == "RedHat" %}
pidfile = /run/uwsgi/graphite/pid
{% endif %}
{% for opts in uwsgi_graphite_extraopts %}
{{ opts.option }}={{ opts.value }}
{% endfor %}

0 comments on commit 8f5aa8f

Please sign in to comment.