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

Use HTTPS for yumrepo when applicable #330

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
default['datadog']['installrepo'] = true
default['datadog']['aptrepo'] = 'http://apt.datadoghq.com'
default['datadog']['aptrepo_dist'] = 'stable'
default['datadog']['yumrepo'] = "http://yum.datadoghq.com/rpm/#{architecture_map[node['kernel']['machine']]}/"
default['datadog']['yumrepo'] = "yum.datadoghq.com/rpm/#{architecture_map[node['kernel']['machine']]}/"
default['datadog']['yumrepo_proxy'] = nil
default['datadog']['yumrepo_proxy_username'] = nil
default['datadog']['yumrepo_proxy_password'] = nil
Expand Down
6 changes: 3 additions & 3 deletions recipes/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
yum_repository 'datadog' do
name 'datadog'
description 'datadog'
url node['datadog']['yumrepo']
# Older versions of yum embed M2Crypto with SSL that doesn't support TLS1.2
prefix = node['platform_version'].to_i < 6 ? 'http' : 'https'
url "#{prefix}://#{node['datadog']['yumrepo']}"
proxy node['datadog']['yumrepo_proxy']
proxy_username node['datadog']['yumrepo_proxy_username']
proxy_password node['datadog']['yumrepo_proxy_password']
# Older versions of yum embed M2Crypto with SSL that doesn't support TLS1.2
prefix = node['platform_version'].to_i < 6 ? 'http' : 'https'
gpgkey "#{prefix}://yum.datadoghq.com/DATADOG_RPM_KEY.public"
action :add
end
Expand Down