Skip to content

Commit

Permalink
Merge pull request #43 from caktus/allow-nr-pinning
Browse files Browse the repository at this point in the history
Add option to pin new relic version
  • Loading branch information
copelco authored Apr 5, 2019
2 parents 5837b61 + b8e0eed commit 6028aae
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ Tequila-django

Changes

v 0.9.22 on Apr 5, 2019
------------------------

* Allow pinning to a specific version of New Relic with ``new_relic_version``


v 0.9.21 on Jan 28, 2019
------------------------

Expand Down
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ The following variables are used by the ``tequila-django`` role:
- ``requirements_extra_args`` **default:** ``""``
- ``use_newrelic`` **default:** ``false``
- ``new_relic_license_key`` **required if use_newrelic is true**
- ``new_relic_version`` **default:** ``""`` pin to a specific version of
`New Relic APM <https://pypi.org/project/newrelic/>`_, e.g. ``"4.14.0.115"``
- ``cloud_staticfiles`` **default:** ``false``
- ``gunicorn_version`` **optional**
- ``gunicorn_num_workers`` **required**
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ static_dir: "{{ root_dir }}/public/static"
media_dir: "{{ root_dir }}/public/media"
log_dir: "{{ root_dir }}/log"
use_newrelic: false
new_relic_version: ""
source_is_local: false
is_web: false
is_worker: false
Expand Down
13 changes: 12 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,18 @@
become_user: "{{ project_user }}"
vars:
ansible_ssh_pipelining: true
when: use_newrelic
when: use_newrelic and not new_relic_version|default(false)

- name: optionally install newrelic at specific version
pip: name=newrelic
state=present
version={{ new_relic_version }}
virtualenv={{ venv_dir }}
virtualenv_python=/usr/bin/python{{ python_version }}
become_user: "{{ project_user }}"
vars:
ansible_ssh_pipelining: true
when: use_newrelic and new_relic_version|default(false)

- name: set up the project python path
copy: content="{{ django_dir }}"
Expand Down

0 comments on commit 6028aae

Please sign in to comment.