Skip to content

Conversation

@derekwbrown
Copy link
Contributor

No description provided.

@derekwbrown derekwbrown requested a review from a team as a code owner October 27, 2020 03:33
- name: Stat if 20200908 key (Expires 2024) RPM key already exists
stat:
path: /tmp/DATADOG_RPM_KEY_20200908.public
register: ddnewkey
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it fine to register ddnewkey twice (once for the E09422B3 key, once for 20200908)? If it's being overridden, that should be okay (but we need an SLES 11 box to test).

We can also decide to use another variable name (eg. ddkey_20200908) to be sure there won't be any conflict.

enabled: yes
gpgcheck: yes
gpgkey: "{% if datadog_agent_major_version|int == 7 %}{{ datadog_yum_gpgkey_e09422b3 }}{% else %}{{ datadog_yum_gpgkey }}{% endif %}"
gpgkey: "{% if datadog_agent_major_version|int == 7 %}{{ datadog_yum_gpgkey_20200908 }}{% else %}{{ datadog_yum_gpgkey }}{% endif %}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know which one should be put here TBH. Is there a way to specify multiple keys here? If there is, we should put all keys there. If not, I guess we should still put the currently used key (e09422b3) since that's the key people need right now. The steps above will ensure that the future key is present.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly (and that's a big if)

  • This line is actually not necessary due to the manual import steps above
  • Since we're manually importing both keys above, it will work either way
  • I chose the most recent key so that when the older key expires it doesn't cause problems

Disambiguate returns of different stages
@derekwbrown derekwbrown merged commit 0c7a077 into master Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants