Skip to content

Commit f09419e

Browse files
author
Christopher M. Neill
committed
This change turns dd_monitoring on or off per task.
1 parent 6f58881 commit f09419e

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

ansible/gamma-hosts/variables

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ registry_host=10.4.4.82
7272
swarm_token=d363b783f03a845a2c82b081bfe8443e
7373
user_content_domain=runnable.ninja
7474
api_hello_runnable_github_token=88ddc423c2312d02a8bbcaad76dd4c374a30e4af
75+
no_dd_monitoring=false
7576

7677
[ec2:vars]
7778
env=gamma

ansible/group_vars/alpha-mongo.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ db_path: "/opt/mongodb/db"
77
container_image: mongo
88
container_tag: "latest"
99
container_run_opts: "-d --name mongodb -p 27017:27017 -v {{ db_path }}:/data/db:rw"
10+
11+
# do not monitor docker-daemon for mongo, as there is none
12+
no_dd_monitoring: true

ansible/roles/datadog/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
- name: add docker to dd-agent group
3333
tags: ['datadog']
3434
sudo: yes
35-
when: name != "mongo"
35+
when: not no_dd_monitoring
3636
shell: usermod -a -G docker dd-agent
3737

3838
- name: create dd configdir
@@ -64,7 +64,7 @@
6464
- name: install docker integration
6565
tags: ['datadog']
6666
sudo: yes
67-
when: name != "mongo"
67+
when: not no_dd_monitoring
6868
template:
6969
src=docker_daemon.yaml.j2
7070
dest=/etc/dd-agent/conf.d/docker_daemon.yaml

0 commit comments

Comments
 (0)