Commit 3e812273 by Carson Gee

Updated datadog agent role

parent 3e037702
......@@ -15,49 +15,37 @@
# - datadog
#
- name: datadog | add apt key
apt_key: id=C7A7DA52 url={{datadog_apt_key}} state=present
- name: datadog | install debian needed pkgs
apt: pkg={{ item }}
with_items: datadog_debian_pkgs
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
- name: datadog | add apt key
apt_key: id=C7A7DA52 url={{datadog_apt_key}} state=present
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
- name: datadog | install apt repository
apt_repository: repo='deb http://apt.datadoghq.com/ unstable main' update_cache=yes
tags:
- datadog
- redhat
when_string: ansible_distribution in common_redhat_variants
- name: datadog | install datadog agent
apt: pkg="datadog-agent" update_cache=yes
apt: pkg="datadog-agent"
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:
lineinfile: >
dest="/etc/dd-agent/datadog.conf"
"regexp=^api_key:.*"
"line=api_key:{{ common_dd_api_key }}"
regexp="^api_key:.*"
line="api_key:{{ datadog_api_key }}"
notify:
- datadog | restart the datadog service
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