Skip to content

Commit

Permalink
Harmonize tasks names between agent5 and agent6
Browse files Browse the repository at this point in the history
  • Loading branch information
xp-1000 authored and hush-hush committed Jun 6, 2018
1 parent 6e0d910 commit fe06ffb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
15 changes: 10 additions & 5 deletions tasks/agent5.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
---
- name: Create main Datadog agent configuration file
- name: (agent5) Create Datadog agent config directory
file:
dest: /etc/dd-agent
state: directory

- name: (agent5) Create main Datadog agent configuration file
template:
src: datadog.conf.j2
dest: /etc/dd-agent/datadog.conf
owner: "{{ datadog_user }}"
group: "{{ datadog_group }}"
notify: restart datadog-agent

- name: Ensure datadog-agent is running
- name: (agent5) Ensure datadog-agent is running
service:
name: datadog-agent
state: started
enabled: yes
when: datadog_enabled and not ansible_check_mode

- name: Ensure datadog-agent is not running
- name: (agent5) Ensure datadog-agent is not running
service:
name: datadog-agent
state: stopped
enabled: no
when: not datadog_enabled

- name: Create a configuration file for each Datadog check
- name: (agent5) Create a configuration file for each Datadog check
template:
src: checks.yaml.j2
dest: "/etc/dd-agent/conf.d/{{ item }}.yaml"
owner: "{{ datadog_user }}"
group: "{{ datadog_group }}"
with_items: "{{ datadog_checks|list }}"
notify: restart datadog-agent
notify: restart datadog-agent
4 changes: 2 additions & 2 deletions tasks/agent6.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
- name: Create /etc/datadog-agent
- name: Create Datadog agent config directory
file:
dest: /etc/datadog-agent
state: directory

- name: Create main Datadog agent yaml configuration file (beta)
- name: Create main Datadog agent configuration file
template:
src: datadog.yaml.j2
dest: /etc/datadog-agent/datadog.yaml
Expand Down

0 comments on commit fe06ffb

Please sign in to comment.