Commit 23f3e6b2 by Carson Gee

Merge pull request #450 from edx/cg/datadog_updates

Updated datadog agent role
parents 3e037702 3e812273
...@@ -15,49 +15,37 @@ ...@@ -15,49 +15,37 @@
# - datadog # - datadog
# #
- name: datadog | add apt key - name: datadog | install debian needed pkgs
apt_key: id=C7A7DA52 url={{datadog_apt_key}} state=present apt: pkg={{ item }}
with_items: datadog_debian_pkgs
tags: tags:
- datadog - datadog
- ubuntu
when: ansible_distribution in common_debian_variants
- name: datadog | install apt repository - name: datadog | add apt key
shell: echo 'deb http://apt.datadoghq.com/ unstable main' > /etc/apt/sources.list.d/datadog-source.list apt_key: id=C7A7DA52 url={{datadog_apt_key}} state=present
tags: tags:
- datadog - datadog
- ubuntu
when: ansible_distribution in common_debian_variants
- name: datadog | add yum repo - name: datadog | install apt repository
copy: apt_repository: repo='deb http://apt.datadoghq.com/ unstable main' update_cache=yes
src=etc/yum.repo.d/datdog.repo
dest=/etc/yum.repo.d/datdog.repo
tags: tags:
- datadog - datadog
- redhat
when_string: ansible_distribution in common_redhat_variants
- name: datadog | install datadog agent - name: datadog | install datadog agent
apt: pkg="datadog-agent" update_cache=yes apt: pkg="datadog-agent"
tags: tags:
- datadog - datadog
- ubuntu
when: ansible_distribution in common_debian_variants
- name: datadog | bootstrap config - name: datadog | bootstrap config
shell: cp /etc/dd-agent/datadog.conf.example /etc/dd-agent/datadog.conf creates=/etc/dd-agent/datadog.conf shell: cp /etc/dd-agent/datadog.conf.example /etc/dd-agent/datadog.conf creates=/etc/dd-agent/datadog.conf
tags: tags:
- datadog - datadog
# quoting intentional, missing space after line=api_key: also
# ansible wasn't handling the double quoted yaml properly
# otherwise.
- name: datadog | update api-key - name: datadog | update api-key
lineinfile: lineinfile: >
dest="/etc/dd-agent/datadog.conf" dest="/etc/dd-agent/datadog.conf"
"regexp=^api_key:.*" regexp="^api_key:.*"
"line=api_key:{{ common_dd_api_key }}" line="api_key:{{ datadog_api_key }}"
notify: notify:
- datadog | restart the datadog service - datadog | restart the datadog service
tags: tags:
......
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