Commit cb12939 1 parent 252589b commit cb12939 Copy full SHA for cb12939
File tree 2 files changed +10
-18
lines changed
2 files changed +10
-18
lines changed Original file line number Diff line number Diff line change 28
28
29
29
# A2923DFF56EDA6E76E55E492D3A80E30382E94DE expires in 2022
30
30
# D75CEA17048B9ACBF186794B32637D44F14F620E expires in 2032
31
- apt_gpg_keys = [ 'A2923DFF56EDA6E76E55E492D3A80E30382E94DE' , 'D75CEA17048B9ACBF186794B32637D44F14F620E' ]
31
+ apt_gpg_key = 'A2923DFF56EDA6E76E55E492D3A80E30382E94DE'
32
32
33
33
# DATADOG_RPM_KEY_E09422B3.public expires in 2022
34
34
# DATADOG_RPM_KEY_20200908.public expires in 2024
65
65
retries = node [ 'datadog' ] [ 'aptrepo_retries' ]
66
66
keyserver = node [ 'datadog' ] [ 'aptrepo_use_backup_keyserver' ] ? node [ 'datadog' ] [ 'aptrepo_backup_keyserver' ] : node [ 'datadog' ] [ 'aptrepo_keyserver' ]
67
67
# Add APT repositories
68
- apt_gpg_keys . each do |apt_gpg_key |
69
- apt_repository "datadog_apt_#{ apt_gpg_key } " do
70
- keyserver keyserver
71
- key apt_gpg_key
72
- uri node [ 'datadog' ] [ 'aptrepo' ]
73
- distribution node [ 'datadog' ] [ 'aptrepo_dist' ]
74
- components components
75
- action :add
76
- retries retries
77
- end
68
+ apt_repository 'datadog' do
69
+ keyserver keyserver
70
+ key apt_gpg_key
71
+ uri node [ 'datadog' ] [ 'aptrepo' ]
72
+ distribution node [ 'datadog' ] [ 'aptrepo_dist' ]
73
+ components components
74
+ action :add
75
+ retries retries
78
76
end
79
77
80
78
# Previous versions of the cookbook could create this repo file, make sure we remove it now
Original file line number Diff line number Diff line change 15
15
end
16
16
17
17
it 'sets up an apt repo with fingerprint A2923DFF56EDA6E76E55E492D3A80E30382E94DE' do
18
- expect ( chef_run ) . to add_apt_repository ( 'datadog_apt_A2923DFF56EDA6E76E55E492D3A80E30382E94DE ' ) . with (
18
+ expect ( chef_run ) . to add_apt_repository ( 'datadog ' ) . with (
19
19
key : [ 'A2923DFF56EDA6E76E55E492D3A80E30382E94DE' ]
20
20
)
21
21
end
22
22
23
- it 'sets up an apt repo with fingerprint D75CEA17048B9ACBF186794B32637D44F14F620E' do
24
- expect ( chef_run ) . to add_apt_repository ( 'datadog_apt_D75CEA17048B9ACBF186794B32637D44F14F620E' ) . with (
25
- key : [ 'D75CEA17048B9ACBF186794B32637D44F14F620E' ]
26
- )
27
- end
28
-
29
23
it 'removes the datadog-beta repo' do
30
24
expect ( chef_run ) . to remove_apt_repository ( 'datadog-beta' )
31
25
end
You can’t perform that action at this time.
0 commit comments