Skip to content

Commit

Permalink
Add switch to enable/disable data gathering from ec2 instances This i…
Browse files Browse the repository at this point in the history
…s needed in some deployments were S3 is being used for file storage but the appserver is in another cloud provider, such as OpenStack.

This issues started happening after the ec2_facts role was replaced with 
the new version `ec2_metadata_facts` that fails when the server is not 
on AWS, unlike its older counterpart.
  • Loading branch information
giovannicimolin committed Jun 6, 2019
1 parent af4c8d4 commit 4a44eaa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions playbooks/roles/aws/tasks/main.yml
Expand Up @@ -27,6 +27,7 @@
- name: Gather ec2 facts for use in other roles
action: ec2_metadata_facts
no_log: True
when: COMMON_TAG_EC2_INSTANCE
tags:
- deploy

Expand Down
7 changes: 7 additions & 0 deletions playbooks/roles/common_vars/defaults/main.yml
Expand Up @@ -98,6 +98,13 @@ COMMON_ENABLE_NEWRELIC_INFRASTRUCTURE: False
# as well
COMMON_ENABLE_NEWRELIC_APP: False
COMMON_ENABLE_MINOS: False
# The COMMON_TAG_EC2_INSTANCE switch is used to enable/disable data gathering
# from ec2 instances.
# This is needed in some deployments were S3 is being used for file storage but
# the appserver is in another cloud provider, such as OpenStack.
# This issues started happening after the ec2_facts role was replaced with
# the new version `ec2_metadata_facts` that fails when the server is not
# on AWS, unlike its older counterpart
COMMON_TAG_EC2_INSTANCE: False
common_boto_version: '2.48.0'
common_node_version: '8.9.3'
Expand Down

0 comments on commit 4a44eaa

Please sign in to comment.