diff --git a/.circleci/config.yml b/.circleci/config.yml index 9398ba63..f132c955 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -383,6 +383,7 @@ workflows: matrix: parameters: ansible_version: ["2_10", "3_4", "4_10"] - os: ["debian", "centos", "amazonlinux2"] + os: ["debian", "centos", "amazonlinux2", "suse"] apm_enabled: ["host", ""] remote_updates: ["true", "false"] + diff --git a/tasks/apm-inject-check.yml b/tasks/apm-inject-check.yml index 2bb08d57..c7aae1b6 100644 --- a/tasks/apm-inject-check.yml +++ b/tasks/apm-inject-check.yml @@ -7,7 +7,9 @@ - name: Fail if APM Host injection is not supported on this host fail: msg: APM Host Injection is not supported in this platform. - when: ansible_facts.os_family not in ["Debian", "RedHat", "Rocky", "AlmaLinux"] + when: > + ansible_facts.os_family not in ["Debian", "RedHat", "Rocky", "AlmaLinux"] and + (ansible_facts.os_family == "Suse" and not datadog_installer_enabled) - name: Fail if APM Host injection type does not contain a supported value fail: diff --git a/tasks/installer-setup.yml b/tasks/installer-setup.yml index 0ebcfdbe..53ad1a3a 100644 --- a/tasks/installer-setup.yml +++ b/tasks/installer-setup.yml @@ -20,10 +20,14 @@ include_tasks: pkg-redhat/install-installer-yum.yml when: ansible_facts.os_family in ["RedHat", "Rocky", "AlmaLinux"] and not ansible_check_mode and ansible_pkg_mgr == "yum" -- name: Include installer YUM install task +- name: Include installer DEB install task include_tasks: pkg-debian/install-installer.yml when: ansible_facts.os_family == "Debian" and not ansible_check_mode +- name: Include installer Zypper install task + include_tasks: pkg-suse/install-installer-zypper.yml + when: ansible_facts.os_family == "Suse" and not ansible_check_mode + - name: Bootstrap the installer command: /usr/bin/datadog-bootstrap bootstrap register: datadog_installer_bootstrap_result diff --git a/tasks/pkg-suse.yml b/tasks/pkg-suse.yml index 124596db..dde3e5f1 100644 --- a/tasks/pkg-suse.yml +++ b/tasks/pkg-suse.yml @@ -130,6 +130,10 @@ register: agent_datadog_zypper_repo_template when: datadog_manage_zypper_repofile +- name: Include installer setup + include_tasks: installer-setup.yml + when: datadog_installer_enabled + # refresh zypper repos only if the template changed - name: Refresh Datadog zypper_repos # noqa: command-instead-of-module command: zypper refresh datadog diff --git a/tasks/pkg-suse/install-installer-zypper.yml b/tasks/pkg-suse/install-installer-zypper.yml new file mode 100644 index 00000000..0ec9e867 --- /dev/null +++ b/tasks/pkg-suse/install-installer-zypper.yml @@ -0,0 +1,7 @@ +--- +- name: Install latest datadog-installer package (zypper) + zypper: + name: "{{ datadog_installer_flavor }}" + state: latest # noqa package-latest + register: datadog_installer_install_result + ignore_errors: true