Commit bcff3b81 by e0d

initial working version, tested on ubuntu.

parent 96449dcb
[datadog]
name = Datadog, Inc.
baseurl = http://yum.datadoghq.com/rpm/
enabled=1
gpgcheck=0
\ No newline at end of file
---
- name: datadog | restart the datadog service
service: name=datadog-agent state=restarted
\ No newline at end of file
---
#
# datadog
#
# Overview:
#
# Installs datadog
##
# Dependencies:
#
# Example play:
# roles:
# - common
# - datadog
#
- name: datadog | add apt key
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C7A7DA52
tags:
- datadog
- ubuntu
when: ansible_distribution in common_debian_variants
- name: datadog | install apt repository
shell: echo 'deb http://apt.datadoghq.com/ unstable main' > /etc/apt/sources.list.d/datadog-source.list
tags:
- datadog
- ubuntu
when: ansible_distribution in common_debian_variants
- name: datadog | add yum repo
copy:
src=etc/yum.repo.d/datdog.repo
dest=/etc/yum.repo.d/datdog.repo
tags:
- datadog
- redhat
when_string: ansible_distribution in common_redhat_variants
- name: datadog | install datadog agent
apt: pkg="datadog-agent" update_cache=yes
tags:
- datadog
- ubuntu
when: ansible_distribution in common_debian_variants
- name: datadog | bootstrap config
shell: cp /etc/dd-agent/datadog.conf.example /etc/dd-agent/datadog.conf creates=/etc/dd-agent/datadog.conf
tags:
- 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
lineinfile:
dest="/etc/dd-agent/datadog.conf"
"regexp=^api_key:$"
"line=api_key:{{ common_datadog_api_key }}"
notify:
- datadog | restart the datadog service
tags:
- datadog
\ No newline at end of file
---
datadog_api_key: "PUT_YOUR_API_KEY_HERE"
datadog_debian_pkgs:
- apparmor-utils
- build-essential
- curl
- g++
- gcc
- ipython
- pkg-config
- rsyslog
\ No newline at end of file
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