Commit 2f823df8 by Kevin Falcone Committed by GitHub

Merge pull request #3837 from edx/jibsheet/newrelic-manually

Make it possible to run the newrelic play on a box without ec2 access
parents a6c7c380 75fb032f
# Run newrelic against a set of machines by tag.
# ansible-playbook -i ec2.py --limit "tag_cluster_mongo" newrelic.yml -e NEWRELIC_LICENSE_KEY='SET_ME' -v
# You can also pass in -e COMMON_ENVIRONMENT=foo -e COMMON_DEPLOYMENT=bar -e CLUSTER_NAME=baz if you want
# to skip looking at ec2 tags.
- name: Deploy Newrelic Server Monitoring
hosts: all
become: True
......@@ -16,10 +18,12 @@
region: "{{ ec2_region }}"
state: "list"
register: instance_tags
when: not COMMON_ENVIRONMENT and not COMMON_DEPLOYMENT
- name: Set labels from EDC
set_fact:
COMMON_ENVIRONMENT: "{{ instance_tags.tags.environment }}"
COMMON_DEPLOYMENT: "{{ instance_tags.tags.deployment }}"
CLUSTER_NAME: "{{ instance_tags.tags.cluster }}"
when: not COMMON_ENVIRONMENT and not COMMON_DEPLOYMENT
roles:
- role: newrelic
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment