Commit ecf8d8e9 by Feanil Patel

Replace the api_key line if it already exists.

parent 3669afc5
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
- name: datadog | update api-key - name: datadog | update api-key
lineinfile: lineinfile:
dest="/etc/dd-agent/datadog.conf" dest="/etc/dd-agent/datadog.conf"
"regexp=^api_key:$" "regexp=^api_key:.*"
"line=api_key:{{ common_datadog_api_key }}" "line=api_key:{{ common_dd_api_key }}"
notify: notify:
- datadog | restart the datadog service - datadog | restart the datadog service
tags: 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