Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old check config file if check is installed with Agent 6/7 #47

Merged
merged 1 commit into from
Jan 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions datadog/config.sls
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,18 @@ datadog_yaml_installed:
{% for check_name in datadog_checks %}

{%- if latest_agent_version or parsed_version[1] != '5' %}
# Make sure the check directory is present
datadog_{{ check_name }}_folder_installed:
file.directory:
- name: {{ datadog_install_settings.confd_path }}/{{ check_name }}.d
- user: dd-agent
- group: root
- mode: 700

# Remove the old config file (if it exists)
datadog_{{ check_name }}_old_yaml_removed:
file.absent:
- name: {{ datadog_install_settings.confd_path }}/{{ check_name }}.yaml
{%- endif %}

datadog_{{ check_name }}_yaml_installed:
Expand Down