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

added support for a repository proxy #615

Merged
merged 1 commit into from
Apr 22, 2016
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
5 changes: 5 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@
# String. URL of the apt GPG key
# Default: http://packages.elastic.co/GPG-KEY-elasticsearch
#
# [*repo_proxy*]
# String. URL for repository proxy
# Default: undef
#
# [*logging_config*]
# Hash representation of information you want in the logging.yml file
#
Expand Down Expand Up @@ -242,6 +246,7 @@
$repo_version = undef,
$repo_key_id = 'D88E42B4',
$repo_key_source = 'http://packages.elastic.co/GPG-KEY-elasticsearch',
$repo_proxy = undef,
$logging_file = undef,
$logging_config = undef,
$logging_template = undef,
Expand Down
1 change: 1 addition & 0 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
gpgcheck => 1,
gpgkey => $::elasticsearch::repo_key_source,
enabled => 1,
proxy => $::elasticsearch::repo_proxy,
}
}
'Suse': {
Expand Down
17 changes: 17 additions & 0 deletions spec/classes/005_elasticsearch_repo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,23 @@

end

context "Override repo proxy" do

let :params do
default_params.merge({
:repo_proxy => 'http://proxy.com:8080'
})
end

case facts[:osfamily]
when 'RedHat'
context 'has override repo proxy' do
it { is_expected.to contain_yumrepo('elasticsearch').with_proxy('http://proxy.com:8080') }
end
end

end

end
end
end