Allow to send optional values to configuration

Under certain situations, is useful to send some
extra configuration to pip.conf, such as the retries,
timeout, etc...
This change allows to pass extra values as optional
settings to the template.

Change-Id: Ibcf431a17717fb7f8b8f501603f035fd9456def4
This commit is contained in:
Yolanda Robla 2015-07-13 13:15:15 +02:00
parent d461920848
commit 4906bf3178
2 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@ class pip (
$index_url = 'https://pypi.python.org/simple',
$trusted_hosts = [],
$manage_pip_conf = false,
$optional_settings = {},
) {
include pip::params
validate_array($trusted_hosts)

View File

@ -6,3 +6,7 @@ trusted-host =
<%= trusted_host %>
<% end -%>
<% end -%>
<% @optional_settings.keys.sort.each do |setting| -%>
<%= setting -%> = <%= @optional_settings[setting] %>
<% end -%>