Skip to content

Support Rocky and AlmaLinux, migrate CI tests from EOL'd CentOS 8 to Rocky Linux 8 #418

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

Merged
merged 1 commit into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ workflows:
ansible_version: ["2_8", "2_9", "2_10"]
agent_version: ["6", "7"]
jinja2_native: ["true", "false"]
os: ["centos8"]
os: ["rocky8"]
python: ["python3"]

# Newer suse images only have Python 3 installed
Expand Down
5 changes: 4 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@
include_tasks: pkg-debian.yml
when: ansible_facts.os_family == "Debian" and not datadog_skip_install

# Only Ansible >= 3.0 knows that AlmaLinux belongs to "RedHat" family
# (and latest bugfix releases of some 2.X)
# For Rocky it is some 4.X and >= 5.0
- name: RedHat Install Tasks
include_tasks: pkg-redhat.yml
when: ansible_facts.os_family == "RedHat" and not datadog_skip_install
when: ansible_facts.os_family in ["RedHat", "Rocky", "AlmaLinux"] and not datadog_skip_install

- name: Suse Install Tasks
include_tasks: pkg-suse.yml
Expand Down
2 changes: 1 addition & 1 deletion tasks/os-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
- name: Fail if OS is not supported
fail:
msg: "The Datadog Ansible role does not support your OS yet. Please email [email protected] to open a feature request."
when: ansible_facts.os_family not in ["RedHat", "Debian", "Suse", "Windows"]
when: ansible_facts.os_family not in ["RedHat", "Rocky", "AlmaLinux", "Debian", "Suse", "Windows"]
4 changes: 4 additions & 0 deletions tasks/parse-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,17 @@
datadog_version_finding_cmds:
Debian: "dpkg -s {{ datadog_agent_flavor }} | grep '^Version:' | awk '{print $2}'"
RedHat: "rpm -q --qf '%{VERSION}-%{RELEASE}' {{ datadog_agent_flavor }}"
Rocky: "rpm -q --qf '%{VERSION}-%{RELEASE}' {{ datadog_agent_flavor }}"
AlmaLinux: "rpm -q --qf '%{VERSION}-%{RELEASE}' {{ datadog_agent_flavor }}"
Suse: "rpm -q --qf '%{EPOCH}:%{VERSION}-%{RELEASE}' {{ datadog_agent_flavor }}"

- name: Create OS-specific version dict
set_fact:
datadog_agent_os2version:
Debian: "{{ datadog_agent_debian_version }}"
RedHat: "{{ datadog_agent_redhat_version }}"
Rocky: "{{ datadog_agent_redhat_version }}"
AlmaLinux: "{{ datadog_agent_redhat_version }}"
Suse: "{{ datadog_agent_suse_version }}"
Windows: "{{ datadog_agent_windows_version }}"

Expand Down