Skip to content

Instantly share code, notes, and snippets.

@mccutchen
Created March 8, 2018 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mccutchen/cabf854d14b8e001cd38a38a4162d958 to your computer and use it in GitHub Desktop.
Save mccutchen/cabf854d14b8e001cd38a38a4162d958 to your computer and use it in GitHub Desktop.
commit 3ebbd2f39d4a3b356d3b5c005caef368eaca4529
Author: Will McCutchen <will@mccutch.org>
Date: Sat Mar 3 14:08:05 2018 -0800
ansible: upgrade to datadog agent 6
diff --git a/ansible/group_vars/all b/ansible/group_vars/all
index dce89d4..c5dd911 100644
--- a/ansible/group_vars/all
+++ b/ansible/group_vars/all
@@ -21,6 +21,7 @@ system_dirs:
- "{{ bin_dir }}"
base_packages:
+ - apt-transport-https
- build-essential
- curl
- daemontools
diff --git a/ansible/roles/datadog/tasks/main.yml b/ansible/roles/datadog/tasks/main.yml
index 532259f..5b611f7 100644
--- a/ansible/roles/datadog/tasks/main.yml
+++ b/ansible/roles/datadog/tasks/main.yml
@@ -1,14 +1,14 @@
---
- name: add apt key
apt_key:
- id=C7A7DA52
+ id=382E94DE
keyserver=keyserver.ubuntu.com
state=present
become: yes
- name: add apt repo
apt_repository:
- repo='deb http://apt.datadoghq.com/ stable main'
+ repo='deb http://apt.datadoghq.com/ stable 6'
state=present
update_cache=yes
become: yes
@@ -21,18 +21,17 @@
- name: add main config
template:
- src=datadog.conf.j2
- dest=/etc/dd-agent/datadog.conf
+ src=datadog.yaml.j2
+ dest=/etc/datadog-agent/datadog.yaml
become: yes
notify: restart datadog
- name: add integration configs
copy:
src={{item}}
- dest=/etc/dd-agent/conf.d/{{item}}
+ dest=/etc/datadog-agent/conf.d/{{item}}
with_items:
- redisdb.yaml
-
notify: restart datadog
become: yes
diff --git a/ansible/roles/datadog/templates/datadog.conf.j2 b/ansible/roles/datadog/templates/datadog.yaml.j2
similarity index 82%
rename from ansible/roles/datadog/templates/datadog.conf.j2
rename to ansible/roles/datadog/templates/datadog.yaml.j2
index b362f92..698f3e1 100644
--- a/ansible/roles/datadog/templates/datadog.conf.j2
+++ b/ansible/roles/datadog/templates/datadog.yaml.j2
@@ -1,11 +1,9 @@
-[Main]
-
# agent config
dd_url: https://app.datadoghq.com
api_key: {{ datadog_api_key }}
use_mount: no
collect_ec2_tags: yes
-collect_instance_metadata: yes
+enable_metadata_collection: yes
# dogstatsd config
dogstatsd_port: {{ datadog_statsd_port }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment