Skip to content

Commit

Permalink
Merge pull request #615 from tosmi/proxy
Browse files Browse the repository at this point in the history
added support for a repository proxy
  • Loading branch information
tylerjl committed Apr 22, 2016
2 parents 35c2575 + a7a3abb commit 1f720d8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
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

0 comments on commit 1f720d8

Please sign in to comment.