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