Skip to content
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

Add includepkgs to repo config #443

Merged
merged 1 commit into from
Jul 14, 2022
Merged
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
14 changes: 14 additions & 0 deletions tasks/pkg-redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,24 @@
key: /tmp/DATADOG_RPM_KEY_20200908.public
state: present
when: not ansible_check_mode

- name: Set versioned includepkgs variable
set_fact:
datadog_includepkgs: "{{ datadog_agent_flavor }}-{{ datadog_agent_redhat_version | regex_replace('^\\d+:', '') }}"
when: datadog_agent_redhat_version is defined

- name: Set plain includepkgs variable
set_fact:
datadog_includepkgs: "{{ datadog_agent_flavor }}"
when: datadog_agent_redhat_version is not defined

- name: Install Datadog Agent 5 yum repo
yum_repository:
name: datadog
description: Datadog, Inc.
baseurl: "{{ datadog_agent5_yum_repo }}"
enabled: yes
includepkgs: "{{ datadog_includepkgs }}"
repo_gpgcheck: no # we don't sign Agent 5 repodata
gpgcheck: "{{ datadog_yum_gpgcheck }}"
gpgkey: [
Expand All @@ -79,6 +90,7 @@
description: Datadog, Inc.
baseurl: "{{ datadog_agent6_yum_repo }}"
enabled: yes
includepkgs: "{{ datadog_includepkgs }}"
repo_gpgcheck: "{{ do_yum_repo_gpgcheck }}"
gpgcheck: "{{ datadog_yum_gpgcheck }}"
gpgkey: [
Expand All @@ -96,6 +108,7 @@
description: Datadog, Inc.
baseurl: "{{ datadog_agent7_yum_repo }}"
enabled: yes
includepkgs: "{{ datadog_includepkgs }}"
repo_gpgcheck: "{{ do_yum_repo_gpgcheck }}"
gpgcheck: "{{ datadog_yum_gpgcheck }}"
gpgkey: [
Expand All @@ -112,6 +125,7 @@
description: Datadog, Inc.
baseurl: "{{ datadog_yum_repo }}"
enabled: yes
includepkgs: "{{ datadog_includepkgs }}"
repo_gpgcheck: "{{ do_yum_repo_gpgcheck }}"
gpgcheck: "{{ datadog_yum_gpgcheck }}"
gpgkey: [
Expand Down