-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Harmonize tasks names between agent5 and agent6
- Loading branch information
Showing
2 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters