Skip to content

Commit

Permalink
Add includepkgs to repo config
Browse files Browse the repository at this point in the history
  • Loading branch information
sspans-sbp committed Jul 12, 2022
1 parent ec5eccc commit 74d6502
Showing 1 changed file with 14 additions and 0 deletions.
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

0 comments on commit 74d6502

Please sign in to comment.