diff --git a/README.md b/README.md index 579f56bd..530c4832 100644 --- a/README.md +++ b/README.md @@ -285,6 +285,16 @@ Available actions: version: ``` +To install third party integrations, set `third_party` to true: + +```yml + datadog_integration: + : + action: + version: + third_party: true +``` + ##### Example This example installs version `1.11.0` of the ElasticSearch integration and removes the `postgres` integration. diff --git a/manual_tests/inventory b/manual_tests/inventory index 41c7a7dd..ce6468b7 100644 --- a/manual_tests/inventory +++ b/manual_tests/inventory @@ -1,2 +1,2 @@ [test_host] -127.0.0.1 ansible_ssh_host=localhost ansible_ssh_user=vagrant ansible_ssh_port=2200 ansible_ssh_private_key_file=./ansible-datadog/tests/.vagrant/machines/default/virtualbox/private_key +127.0.0.1 ansible_ssh_host=localhost ansible_ssh_user=vagrant ansible_ssh_port=2222 ansible_ssh_private_key_file=./ansible-datadog/manual_tests/.vagrant/machines/default/virtualbox/private_key diff --git a/manual_tests/test_7_full.yml b/manual_tests/test_7_full.yml index 2f275ce4..32c4899b 100644 --- a/manual_tests/test_7_full.yml +++ b/manual_tests/test_7_full.yml @@ -25,6 +25,11 @@ env: dev trace.concentrator: extra_aggregators: version + datadog_integration: + datadog-aqua: + action: 'install' + version: '1.0.0' + third_party: true datadog_checks: process: init_config: diff --git a/tasks/integration.yml b/tasks/integration.yml index d46ee6bb..55a55e7a 100644 --- a/tasks/integration.yml +++ b/tasks/integration.yml @@ -49,20 +49,19 @@ # Install integrations - name: Install pinned version of integrations (Unix) - command: - argv: - - "{{ datadog_agent_binary_path }}" - - integration - - install - - "{{ item.key }}=={{ item.value.version }}" + command: "{{ datadog_agent_binary_path }} integration install {{ third_party }} {{ item.key }}=={{ item.value.version }}" become: yes become_user: "{{ integration_command_user }}" + vars: + third_party: "{% if 'third_party' in item.value and item.value.third_party == true %}--third-party{% endif %}" loop: "{{ datadog_integration|dict2items }}" when: item.value.action == "install" and ansible_os_family != "Windows" - name: Install pinned version of integrations (Windows) - win_command: "\"{{ datadog_agent_binary_path }}\" integration install {{ item.key }}=={{ item.value.version }}" + win_command: "\"{{ datadog_agent_binary_path }}\" integration install {{ third_party }} {{ item.key }}=={{ item.value.version }}" become: yes + vars: + third_party: "{% if 'third_party' in item.value and item.value.third_party == true %}--third-party{% endif %}" become_user: "{{ integration_command_user }}" loop: "{{ datadog_integration|dict2items }}" when: item.value.action == "install" and ansible_os_family == "Windows"