Commit 7955e5b6 authored by Christopher Huhn's avatar Christopher Huhn 🥚
Browse files

Add support for proxy setup

parent 0ef427cb
......@@ -11,6 +11,9 @@ default_unless['debmirror']['keyring'] =
# the user that runs the scripts:
default_unless['debmirror']['mirrors'] = {}
# proxy for mirroring
default_unless['debmirror']['proxy'] = nil
# the directory the generated debmirror scripts are placed into:
default_unless['debmirror']['script_dir'] = '/etc/debmirror.d'
......
......@@ -4,7 +4,7 @@ maintainer_email 'hpc@gsi.de'
license 'GNU Public License 3.0'
description 'Installs/Configures debmirror'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.2.0'
version '0.2.1'
source_url 'https://git.gsi.de/chef/cookbooks/debmirror'
issues_url 'https://git.gsi.de/chef/cookbooks/debmirror/issues'
......@@ -30,6 +30,7 @@ property :keyring, [String, nil], default: node['debmirror']['keyring']
property :server, String, default: 'deb.debian.org'
property :proto, String, default: 'http'
property :path, String, default: '/'
property :proxy, [String, nil], default: node['debmirror']['proxy']
property :mirror_dir, [String, nil]
property :options, Array, default: []
property :script_dir, String, default: node['debmirror']['script_dir']
......@@ -91,6 +92,7 @@ action :add do
server: new_resource.server,
proto: new_resource.proto,
path: new_resource.path,
proxy: new_resource.proxy,
storage: storage,
keyring: new_resource.keyring,
options: new_resource.options,
......
......@@ -18,7 +18,7 @@ server=<%= @server %>
# Path from the main server, so http://my.web.server/$dir, Server dependant
path=<%= @path %>
# Protocol to use for transfer (http, ftp, hftp, rsync)
# Protocol to use for transfer (http, ftp, https, rsync)
proto=<%= @proto %>
# Directory to store the mirror in
......@@ -43,6 +43,9 @@ error_filter <%- end -%>debmirror \
<%- if @rsync_extra -%>
--rsync-extra <%= @rsync_extra.join(',') %> \
<%- end -%>
<%- if @proxy %>
--proxy <%= @proxy %> \
<%- end -%>
<% @options.each do |option| %>
<%= option %> \
<% end -%>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment