From e7c07539903a2d32ab50a33158925021b0f2c36e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= Date: Tue, 9 Jan 2024 08:46:38 +0100 Subject: [PATCH 1/2] remove trailing whitespaces --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4a0aa575..884dce5b 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ To deploy the Datadog Agent on hosts, add the Datadog role and your API key to y | `datadog_config_ex` | (Optional) Extra INI sections to go in `/etc/dd-agent/datadog.conf` (Agent v5 only).| | `datadog_apt_repo` | Override the default Datadog `apt` repository. Make sure to use the `signed-by` option if repository metadata is signed using Datadog's signing keys: `deb [signed-by=/usr/share/keyrings/datadog-archive-keyring.gpg] https://yourrepo`.| | `datadog_apt_cache_valid_time` | Override the default apt cache expiration time (defaults to 1 hour).| -| `datadog_apt_key_url_new` | Override the location from which to obtain Datadog `apt` key (the deprecated `datadog_apt_key_url` variable refers to an expired key that's been removed from the role). The URL is expected to be a GPG keyring containing keys `382E94DE`, `F14F620E` and `C0962C7D`.| +| `datadog_apt_key_url_new` | Override the location from which to obtain Datadog `apt` key (the deprecated `datadog_apt_key_url` variable refers to an expired key that's been removed from the role). The URL is expected to be a GPG keyring containing keys `382E94DE`, `F14F620E` and `C0962C7D`.| | `datadog_yum_repo_config_enabled` | Set to `false` to prevent the configuration of a Datadog `yum` repository (defaults to `true`). WARNING: it deactivates the automatic update of GPG keys.| | `datadog_yum_repo` | Override the default Datadog `yum` repository.| | `datadog_yum_repo_proxy` | Set a proxy URL to use in the Datadog `yum` repo configuration.| @@ -97,7 +97,7 @@ To deploy the Datadog Agent on hosts, add the Datadog role and your API key to y ### Integrations -To configure a Datadog integration (check), add an entry to the `datadog_checks` section. The first level key is the name of the check, and the value is the YAML payload to write the configuration file. Examples are provided below. +To configure a Datadog integration (check), add an entry to the `datadog_checks` section. The first level key is the name of the check, and the value is the YAML payload to write the configuration file. Examples are provided below. To install or remove an integration, refer to the `datadog_integrations` [paragraph][22] From e0b71326a82bdbf75c88e59c3df9df826cab7968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= Date: Tue, 9 Jan 2024 08:46:47 +0100 Subject: [PATCH 2/2] add notes about API key being mandatory [APL-2695] --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 884dce5b..6f061f6a 100644 --- a/README.md +++ b/README.md @@ -48,11 +48,13 @@ To deploy the Datadog Agent on hosts, add the Datadog role and your API key to y datadog_api_key: "" ``` +The API key is required and its absence would cause the role to fail. If you want to provide it through another way, outside of Ansible's control, you'll still need to specify a dummy key and substitute it at a later point. + ## Role variables | Variable | Description | |---------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `datadog_api_key` | Your Datadog API key.| +| `datadog_api_key` | Your Datadog API key. This variable is mandatory.| | `datadog_site` | The site of the Datadog intake to send Agent data to. Defaults to `datadoghq.com`, set to `datadoghq.eu` to send data to the EU site. This option is only available with Agent version >= 6.6.0.| | `datadog_agent_flavor` | Override the default Debian / RedHat Package for IOT Installations on RPI. Defaults to "datadog-agent" - use "datadog-iot-agent" for RPI.| | `datadog_agent_version` | The pinned version of the Agent to install (optional, but recommended), for example: `7.16.0`. Setting `datadog_agent_major_version` is not needed if `datadog_agent_version` is used.| @@ -652,6 +654,14 @@ localhost | FAILED! => { To fix this, [update Ansible to `v2.9.8` or above][16]. +### Missing API key + +Starting from role `4.21` the API key is mandatory for the role to proceed. + +If you need to install the agent through Ansible but don't want to specify an API key (if you are baking it into a container/VM image for instance) you can: +* Specify a dummy API key and replace it afterward +* Disable managed_config (`datadog_manage_config: false`) + [1]: https://galaxy.ansible.com/Datadog/datadog [2]: https://github.com/DataDog/ansible-datadog [3]: https://docs.datadoghq.com/agent/autodiscovery