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

Install expired 2022 rpm gpg key only when needed on agent <= 7.35 #561

Merged
merged 3 commits into from
Apr 10, 2024
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
7 changes: 4 additions & 3 deletions tasks/pkg-redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,19 @@
state: present
when: not ansible_check_mode

- name: Download new RPM key (Expires in 2022)
- name: Download old RPM key (Expires in 2022)
get_url:
url: "{{ datadog_yum_gpgkey_e09422b3 }}"
dest: /tmp/DATADOG_RPM_KEY_E09422B3.public
Pythyu marked this conversation as resolved.
Show resolved Hide resolved
mode: '600'
checksum: "sha256:{{ datadog_yum_gpgkey_e09422b3_sha256sum }}"
when: agent_datadog_minor is defined and agent_datadog_minor | int < 36

- name: Import new RPM key (Expires in 2022)
- name: Import old RPM key (Expires in 2022)
rpm_key:
key: /tmp/DATADOG_RPM_KEY_E09422B3.public
state: present
when: not ansible_check_mode
when: not ansible_check_mode and agent_datadog_minor is defined and agent_datadog_minor | int < 36
chouquette marked this conversation as resolved.
Show resolved Hide resolved

- name: Download new RPM key (Expires in 2024)
get_url:
Expand Down
6 changes: 3 additions & 3 deletions tasks/pkg-suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@
url: "{{ datadog_zypper_gpgkey_e09422b3 }}"
dest: /tmp/DATADOG_RPM_KEY_E09422B3.public
mode: '600'
when: not agent_ddnewkey.stat.exists
when: not agent_ddnewkey.stat.exists and agent_datadog_minor is defined and agent_datadog_minor | int < 36

- name: Download E09422B3 key (Expires 2022) RPM key
get_url:
url: "{{ datadog_zypper_gpgkey_e09422b3 }}"
dest: /tmp/DATADOG_RPM_KEY_E09422B3.public
checksum: sha256:{{ datadog_zypper_gpgkey_e09422b3_sha256sum }}
mode: '600'
when: ansible_distribution_version|int >= 12
when: ansible_distribution_version|int >= 12 and agent_datadog_minor is defined and agent_datadog_minor | int < 36

- name: Import E09422B3 key (Expires 2022) RPM key
rpm_key:
key: /tmp/DATADOG_RPM_KEY_E09422B3.public
state: present
when: not ansible_check_mode
when: not ansible_check_mode and agent_datadog_minor is defined and agent_datadog_minor | int < 36

- name: Check and download 20200908 key # Work around due to SNI check for SLES11
when: ansible_distribution_version|int == 11
Expand Down