Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CHEF
cookbooks
debmirror
Commits
7955e5b6
Commit
7955e5b6
authored
Jun 18, 2021
by
Christopher Huhn
🥚
Browse files
Add support for proxy setup
parent
0ef427cb
Changes
4
Hide whitespace changes
Inline
Side-by-side
attributes/default.rb
View file @
7955e5b6
...
@@ -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'
...
...
metadata.rb
View file @
7955e5b6
...
@@ -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'
resources/repository.rb
View file @
7955e5b6
...
@@ -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
,
...
...
templates/default/debmirror.sh.erb
View file @
7955e5b6
...
@@ -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, h
f
tp, rsync)
# Protocol to use for transfer (http, ftp, h
t
tp
s
, 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
-%>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment