infrataster-plugin-ldap 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/.rspec +2 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +51 -0
- data/Rakefile +36 -0
- data/infrataster-plugin-ldap.gemspec +23 -0
- data/lib/infrataster-plugin-ldap.rb +4 -0
- data/lib/infrataster/contexts/ldap_context.rb +63 -0
- data/lib/infrataster/helpers/ldap_resource_helper.rb +12 -0
- data/lib/infrataster/resources/ldap_resource.rb +19 -0
- data/spec/.vagrant/machines/default/virtualbox/action_provision +1 -0
- data/spec/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/spec/.vagrant/machines/default/virtualbox/id +1 -0
- data/spec/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/spec/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/spec/Vagrantfile +20 -0
- data/spec/cookbooks/apt/CHANGELOG.md +208 -0
- data/spec/cookbooks/apt/README.md +252 -0
- data/spec/cookbooks/apt/attributes/default.rb +46 -0
- data/spec/cookbooks/apt/files/default/apt-proxy-v2.conf +50 -0
- data/spec/cookbooks/apt/libraries/helpers.rb +49 -0
- data/spec/cookbooks/apt/libraries/matchers.rb +17 -0
- data/spec/cookbooks/apt/libraries/network.rb +31 -0
- data/spec/cookbooks/apt/metadata.json +54 -0
- data/spec/cookbooks/apt/metadata.rb +34 -0
- data/spec/cookbooks/apt/providers/preference.rb +63 -0
- data/spec/cookbooks/apt/providers/repository.rb +203 -0
- data/spec/cookbooks/apt/recipes/cacher-client.rb +81 -0
- data/spec/cookbooks/apt/recipes/cacher-ng.rb +43 -0
- data/spec/cookbooks/apt/recipes/default.rb +98 -0
- data/spec/cookbooks/apt/recipes/unattended-upgrades.rb +43 -0
- data/spec/cookbooks/apt/resources/preference.rb +32 -0
- data/spec/cookbooks/apt/resources/repository.rb +43 -0
- data/spec/cookbooks/apt/templates/debian-6.0/acng.conf.erb +173 -0
- data/spec/cookbooks/apt/templates/default/01proxy.erb +5 -0
- data/spec/cookbooks/apt/templates/default/20auto-upgrades.erb +2 -0
- data/spec/cookbooks/apt/templates/default/50unattended-upgrades.erb +62 -0
- data/spec/cookbooks/apt/templates/default/acng.conf.erb +275 -0
- data/spec/cookbooks/apt/templates/default/unattended-upgrades.seed.erb +1 -0
- data/spec/cookbooks/apt/templates/ubuntu-10.04/acng.conf.erb +269 -0
- data/spec/cookbooks/openldap/CHANGELOG.md +68 -0
- data/spec/cookbooks/openldap/README.md +185 -0
- data/spec/cookbooks/openldap/attributes/default.rb +76 -0
- data/spec/cookbooks/openldap/files/default/common-account +7 -0
- data/spec/cookbooks/openldap/files/default/common-auth +9 -0
- data/spec/cookbooks/openldap/files/default/common-password +7 -0
- data/spec/cookbooks/openldap/files/default/common-session +9 -0
- data/spec/cookbooks/openldap/files/default/nsswitch.conf +21 -0
- data/spec/cookbooks/openldap/files/default/slapd.seed +21 -0
- data/spec/cookbooks/openldap/files/default/test/auth_test.rb +7 -0
- data/spec/cookbooks/openldap/files/default/test/server_test.rb +24 -0
- data/spec/cookbooks/openldap/metadata.json +124 -0
- data/spec/cookbooks/openldap/metadata.rb +102 -0
- data/spec/cookbooks/openldap/recipes/auth.rb +71 -0
- data/spec/cookbooks/openldap/recipes/client.rb +28 -0
- data/spec/cookbooks/openldap/recipes/default.rb +18 -0
- data/spec/cookbooks/openldap/recipes/master.rb +23 -0
- data/spec/cookbooks/openldap/recipes/server.rb +124 -0
- data/spec/cookbooks/openldap/recipes/slave.rb +32 -0
- data/spec/cookbooks/openldap/templates/default/default_slapd.erb +47 -0
- data/spec/cookbooks/openldap/templates/default/ldap-ldap.conf.erb +16 -0
- data/spec/cookbooks/openldap/templates/default/ldap.conf.erb +31 -0
- data/spec/cookbooks/openldap/templates/default/libnss-ldap.conf.erb +28 -0
- data/spec/cookbooks/openldap/templates/default/login_access.conf.erb +16 -0
- data/spec/cookbooks/openldap/templates/default/slapd.conf.erb +132 -0
- data/spec/ldap_spec.rb +10 -0
- data/spec/spec_helper.rb +17 -0
- metadata +253 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Cookbook Name:: apt
|
|
3
|
+
# Recipe:: default
|
|
4
|
+
#
|
|
5
|
+
# Copyright 2008-2013, Opscode, Inc.
|
|
6
|
+
# Copyright 2009, Bryan McLellan <btm@loftninjas.org>
|
|
7
|
+
#
|
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the 'License');
|
|
9
|
+
# you may not use this file except in compliance with the License.
|
|
10
|
+
# You may obtain a copy of the License at
|
|
11
|
+
#
|
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
#
|
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
# distributed under the License is distributed on an 'AS IS' BASIS,
|
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
# See the License for the specific language governing permissions and
|
|
18
|
+
# limitations under the License.
|
|
19
|
+
#
|
|
20
|
+
|
|
21
|
+
# On systems where apt is not installed, the resources in this recipe are not
|
|
22
|
+
# executed. However, they _must_ still be present in the resource collection
|
|
23
|
+
# or other cookbooks which notify these resources will fail on non-apt-enabled
|
|
24
|
+
# systems.
|
|
25
|
+
|
|
26
|
+
Chef::Log.debug 'apt is not installed. Apt-specific resources will not be executed.' unless apt_installed?
|
|
27
|
+
|
|
28
|
+
first_run_file = File.join(Chef::Config[:file_cache_path], "apt_compile_time_update_first_run")
|
|
29
|
+
|
|
30
|
+
# If compile_time_update run apt-get update at compile time
|
|
31
|
+
if node['apt']['compile_time_update'] && ( !::File.exist?('/var/lib/apt/periodic/update-success-stamp') || !::File.exist?(first_run_file) )
|
|
32
|
+
e = bash 'apt-get-update at compile time' do
|
|
33
|
+
code <<-EOH
|
|
34
|
+
apt-get update
|
|
35
|
+
touch #{first_run_file}
|
|
36
|
+
EOH
|
|
37
|
+
ignore_failure true
|
|
38
|
+
only_if { apt_installed? }
|
|
39
|
+
action :nothing
|
|
40
|
+
end
|
|
41
|
+
e.run_action(:run)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Run apt-get update to create the stamp file
|
|
45
|
+
execute 'apt-get-update' do
|
|
46
|
+
command 'apt-get update'
|
|
47
|
+
ignore_failure true
|
|
48
|
+
only_if { apt_installed? }
|
|
49
|
+
not_if { ::File.exist?('/var/lib/apt/periodic/update-success-stamp') }
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# For other recipes to call to force an update
|
|
53
|
+
execute 'apt-get update' do
|
|
54
|
+
command 'apt-get update'
|
|
55
|
+
ignore_failure true
|
|
56
|
+
only_if { apt_installed? }
|
|
57
|
+
action :nothing
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Automatically remove packages that are no longer needed for dependencies
|
|
61
|
+
execute 'apt-get autoremove' do
|
|
62
|
+
command 'apt-get -y autoremove'
|
|
63
|
+
only_if { apt_installed? }
|
|
64
|
+
action :nothing
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Automatically remove .deb files for packages no longer on your system
|
|
68
|
+
execute 'apt-get autoclean' do
|
|
69
|
+
command 'apt-get -y autoclean'
|
|
70
|
+
only_if { apt_installed? }
|
|
71
|
+
action :nothing
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# provides /var/lib/apt/periodic/update-success-stamp on apt-get update
|
|
75
|
+
package 'update-notifier-common' do
|
|
76
|
+
notifies :run, 'execute[apt-get-update]', :immediately
|
|
77
|
+
only_if { apt_installed? }
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
execute 'apt-get-update-periodic' do
|
|
81
|
+
command 'apt-get update'
|
|
82
|
+
ignore_failure true
|
|
83
|
+
only_if do
|
|
84
|
+
apt_installed? &&
|
|
85
|
+
::File.exist?('/var/lib/apt/periodic/update-success-stamp') &&
|
|
86
|
+
::File.mtime('/var/lib/apt/periodic/update-success-stamp') < Time.now - node['apt']['periodic_update_min_delay']
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
%w{/var/cache/local /var/cache/local/preseeding}.each do |dirname|
|
|
91
|
+
directory dirname do
|
|
92
|
+
owner 'root'
|
|
93
|
+
group 'root'
|
|
94
|
+
mode 00755
|
|
95
|
+
action :create
|
|
96
|
+
only_if { apt_installed? }
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Cookbook Name:: apt
|
|
3
|
+
# Recipe:: unattended-upgrades
|
|
4
|
+
#
|
|
5
|
+
# Copyright 2014, Opscode, Inc.
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the 'License');
|
|
8
|
+
# you may not use this file except in compliance with the License.
|
|
9
|
+
# You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
# distributed under the License is distributed on an 'AS IS' BASIS,
|
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
# See the License for the specific language governing permissions and
|
|
17
|
+
# limitations under the License.
|
|
18
|
+
#
|
|
19
|
+
|
|
20
|
+
# On systems where apt is not installed, the resources in this recipe are not
|
|
21
|
+
# executed. However, they _must_ still be present in the resource collection
|
|
22
|
+
# or other cookbooks which notify these resources will fail on non-apt-enabled
|
|
23
|
+
# systems.
|
|
24
|
+
#
|
|
25
|
+
|
|
26
|
+
package 'unattended-upgrades' do
|
|
27
|
+
response_file 'unattended-upgrades.seed.erb'
|
|
28
|
+
action :install
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
template '/etc/apt/apt.conf.d/20auto-upgrades' do
|
|
32
|
+
owner 'root'
|
|
33
|
+
group 'root'
|
|
34
|
+
mode '644'
|
|
35
|
+
source '20auto-upgrades.erb'
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
template '/etc/apt/apt.conf.d/50unattended-upgrades' do
|
|
39
|
+
owner 'root'
|
|
40
|
+
group 'root'
|
|
41
|
+
mode '644'
|
|
42
|
+
source '50unattended-upgrades.erb'
|
|
43
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Cookbook Name:: apt
|
|
3
|
+
# Resource:: preference
|
|
4
|
+
#
|
|
5
|
+
# Copyright 2010-2013, Opscode, Inc.
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
# you may not use this file except in compliance with the License.
|
|
9
|
+
# You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
# See the License for the specific language governing permissions and
|
|
17
|
+
# limitations under the License.
|
|
18
|
+
#
|
|
19
|
+
|
|
20
|
+
actions :add, :remove
|
|
21
|
+
default_action :add if defined?(default_action) # Chef > 10.8
|
|
22
|
+
|
|
23
|
+
# Needed for Chef versions < 0.10.10
|
|
24
|
+
def initialize(*args)
|
|
25
|
+
super
|
|
26
|
+
@action = :add
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
attribute :package_name, :kind_of => String, :name_attribute => true
|
|
30
|
+
attribute :glob, :kind_of => String
|
|
31
|
+
attribute :pin, :kind_of => String
|
|
32
|
+
attribute :pin_priority, :kind_of => String
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Cookbook Name:: apt
|
|
3
|
+
# Resource:: repository
|
|
4
|
+
#
|
|
5
|
+
# Copyright 2010-2013, Opscode, Inc.
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
# you may not use this file except in compliance with the License.
|
|
9
|
+
# You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
# See the License for the specific language governing permissions and
|
|
17
|
+
# limitations under the License.
|
|
18
|
+
#
|
|
19
|
+
|
|
20
|
+
actions :add, :remove
|
|
21
|
+
default_action :add if defined?(default_action) # Chef > 10.8
|
|
22
|
+
|
|
23
|
+
# Needed for Chef versions < 0.10.10
|
|
24
|
+
def initialize(*args)
|
|
25
|
+
super
|
|
26
|
+
@action = :add
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# name of the repo, used for source.list filename
|
|
30
|
+
attribute :repo_name, :kind_of => String, :name_attribute => true
|
|
31
|
+
attribute :uri, :kind_of => String
|
|
32
|
+
attribute :distribution, :kind_of => String
|
|
33
|
+
attribute :components, :kind_of => Array, :default => []
|
|
34
|
+
attribute :arch, :kind_of => String, :default => nil
|
|
35
|
+
attribute :trusted, :kind_of => [TrueClass, FalseClass], :default => false
|
|
36
|
+
# whether or not to add the repository as a source repo as well
|
|
37
|
+
attribute :deb_src, :default => false
|
|
38
|
+
attribute :keyserver, :kind_of => String, :default => nil
|
|
39
|
+
attribute :key, :kind_of => String, :default => nil
|
|
40
|
+
attribute :cookbook, :kind_of => String, :default => nil
|
|
41
|
+
# trigger cache rebuild
|
|
42
|
+
# If not you can trigger in the recipe itself after checking the status of resource.updated{_by_last_action}?
|
|
43
|
+
attribute :cache_rebuild, :kind_of => [TrueClass, FalseClass], :default => true
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Letter case in directive names does not matter. Must be separated with colons.
|
|
2
|
+
# Valid boolean values are a zero number for false, non-zero numbers for true.
|
|
3
|
+
|
|
4
|
+
CacheDir: <%= node['apt']['cacher_dir'] %>
|
|
5
|
+
|
|
6
|
+
# set empty to disable logging
|
|
7
|
+
LogDir: /var/log/apt-cacher-ng
|
|
8
|
+
|
|
9
|
+
# TCP (http) port
|
|
10
|
+
# Set to 9999 to emulate apt-proxy
|
|
11
|
+
Port:<%= node['apt']['cacher_port'] %>
|
|
12
|
+
|
|
13
|
+
# Addresses or hostnames to listen on. Multiple addresses must be separated by
|
|
14
|
+
# spaces. Each entry must be associated with a local interface. DNS resolution
|
|
15
|
+
# is performed using getaddrinfo(3) for all available protocols (i.e. IPv4 and
|
|
16
|
+
# IPv6 if available).
|
|
17
|
+
#
|
|
18
|
+
# Default: not set, will listen on all interfaces.
|
|
19
|
+
#
|
|
20
|
+
# BindAddress: localhost 192.168.7.254 publicNameOnMainInterface
|
|
21
|
+
|
|
22
|
+
#Proxy: http://www-proxy.example.net:80
|
|
23
|
+
#proxy: http://username:proxypassword@proxy.example.net:3128
|
|
24
|
+
|
|
25
|
+
# Repository remapping. See manual for details.
|
|
26
|
+
# In this example, backends file is generated during package installation.
|
|
27
|
+
Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian
|
|
28
|
+
Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu
|
|
29
|
+
Remap-debvol: file:debvol_mirror*.gz /debian-volatile ; file:backends_debvol
|
|
30
|
+
Remap-cygwin: file:cygwin_mirrors /cygwin # ; file:backends_cygwin # incomplete, please create this file
|
|
31
|
+
|
|
32
|
+
# Virtual page accessible in a web browser to see statistics and status
|
|
33
|
+
# information, i.e. under http://localhost:3142/acng-report.html
|
|
34
|
+
ReportPage: acng-report.html
|
|
35
|
+
|
|
36
|
+
# Socket file for accessing through local UNIX socket instead of TCP/IP. Can be
|
|
37
|
+
# used with inetd bridge or cron client.
|
|
38
|
+
# SocketPath:/var/run/apt-cacher-ng/socket
|
|
39
|
+
|
|
40
|
+
# Forces log file to be written to disk after every line when set to 1. Default
|
|
41
|
+
# is 0, buffer flush happens after client disconnects.
|
|
42
|
+
#
|
|
43
|
+
# (technically, this is an alias to the Debug option provided for convenience)
|
|
44
|
+
#
|
|
45
|
+
# UnbufferLogs: 0
|
|
46
|
+
|
|
47
|
+
# Set to 0 to store only type, time and transfer sizes.
|
|
48
|
+
# 1 -> client IP and relative local path are logged too
|
|
49
|
+
# VerboseLog: 1
|
|
50
|
+
|
|
51
|
+
# Don't detach from the console
|
|
52
|
+
# ForeGround: 0
|
|
53
|
+
|
|
54
|
+
# Store the pid of the daemon process therein
|
|
55
|
+
# PidFile: /var/run/apt-cacher-ng/pid
|
|
56
|
+
|
|
57
|
+
# Forbid outgoing connections, work around them or respond with 503 error
|
|
58
|
+
# offlinemode:0
|
|
59
|
+
|
|
60
|
+
# Forbid all downloads that don't run through preconfigured backends (.where)
|
|
61
|
+
#ForceManaged: 0
|
|
62
|
+
|
|
63
|
+
# Days before considering an unreferenced file expired (to be deleted).
|
|
64
|
+
# Warning: if the value is set too low and particular index files are not
|
|
65
|
+
# available for some days (mirror downtime) there is a risk of deletion of
|
|
66
|
+
# still usefull package files.
|
|
67
|
+
ExTreshold: 4
|
|
68
|
+
|
|
69
|
+
# Stop expiration when a critical problem appeared. Currently only failed
|
|
70
|
+
# refresh of an index file is considered as critical.
|
|
71
|
+
#
|
|
72
|
+
# WARNING: don't touch this option or set to a non-zero number.
|
|
73
|
+
# Anything else is DANGEROUS and may cause data loss.
|
|
74
|
+
#
|
|
75
|
+
# ExAbortOnProblems: 1
|
|
76
|
+
|
|
77
|
+
# Replace some Windows/DOS-FS incompatible chars when storing
|
|
78
|
+
# StupidFs: 0
|
|
79
|
+
|
|
80
|
+
# Experimental feature for apt-listbugs: pass-through SOAP requests and
|
|
81
|
+
# responses to/from bugs.debian.org. If not set, default is true if
|
|
82
|
+
# ForceManaged is enabled and false otherwise.
|
|
83
|
+
# ForwardBtsSoap: 1
|
|
84
|
+
|
|
85
|
+
# The daemon has a small cache for DNS data, to speed up resolution. The
|
|
86
|
+
# expiration time of the DNS entries can be configured in seconds.
|
|
87
|
+
# DnsCacheSeconds: 3600
|
|
88
|
+
|
|
89
|
+
# Don't touch the following values without good consideration!
|
|
90
|
+
#
|
|
91
|
+
# Max. count of connection threads kept ready (for faster response in the
|
|
92
|
+
# future). Should be a sane value between 0 and average number of connections,
|
|
93
|
+
# and depend on the amount of spare RAM.
|
|
94
|
+
# MaxStandbyConThreads: 8
|
|
95
|
+
#
|
|
96
|
+
# Hard limit of active thread count for incomming connections, i.e. operation
|
|
97
|
+
# is refused when this value is reached (below zero = unlimited).
|
|
98
|
+
# MaxConThreads: -1
|
|
99
|
+
#
|
|
100
|
+
#VfilePattern = (^|.*?/)(Index|Packages\.bz2|Packages\.gz|Packages|Release|Release\.gpg|Sources\.bz2|Sources\.gz|Sources|release|index\.db-.*\.gz|Contents-[^/]*\.gz|pkglist[^/]*\.bz2|rclist[^/]*\.bz2|/meta-release[^/]*|Translation[^/]*\.bz2)$
|
|
101
|
+
#PfilePattern = .*(\.deb|\.rpm|\.dsc|\.tar\.gz\.gpg|\.tar\.gz|\.diff\.gz|\.diff\.bz2|\.jigdo|\.template|changelog|copyright|\.udeb|\.diff/.*\.gz|vmlinuz|initrd\.gz|(Devel)?ReleaseAnnouncement(\\?.*)?)$
|
|
102
|
+
# Whitelist for expiration, file types not to be removed even when being
|
|
103
|
+
# unreferenced. Default: same as VfilePattern which is a safe bed. When and
|
|
104
|
+
# only when the only used mirrors are official repositories (with working
|
|
105
|
+
# Release files) then it might be set to something more restrictive, like
|
|
106
|
+
# (^|.*?/)(Release|Release\.gpg|release|meta-release|Translation[^/]*\.bz2)$
|
|
107
|
+
#WfilePattern = (^|.*?/)(Index|Packages\.bz2|Packages\.gz|Packages|Release|Release\.gpg|Sources\.bz2|Sources\.gz|Sources|release|index\.db-.*\.gz|Contents-[^/]*\.gz|pkglist[^/]*\.bz2|rclist[^/]*\.bz2|/meta-release[^/]*|Translation[^/]*\.bz2)$
|
|
108
|
+
|
|
109
|
+
# Higher modes only working with the debug version
|
|
110
|
+
# Warning, writes a lot into apt-cacher.err logfile
|
|
111
|
+
# Value overwrites UnbufferLogs setting (aliased)
|
|
112
|
+
# Debug:3
|
|
113
|
+
|
|
114
|
+
# Usually, general purpose proxies like Squid expose the IP adress of the
|
|
115
|
+
# client user to the remote server using the X-Forwarded-For HTTP header. This
|
|
116
|
+
# behaviour can be optionally turned on with the Expose-Origin option.
|
|
117
|
+
# ExposeOrigin: 0
|
|
118
|
+
|
|
119
|
+
# When logging the originating IP address, trust the information supplied by
|
|
120
|
+
# the client in the X-Forwarded-For header.
|
|
121
|
+
# LogSubmittedOrigin: 0
|
|
122
|
+
|
|
123
|
+
# The version string reported to the peer, to be displayed as HTTP client (and
|
|
124
|
+
# version) in the logs of the mirror.
|
|
125
|
+
# WARNING: some archives use this header to detect/guess capabilities of the
|
|
126
|
+
# client (i.e. redirection support) and change the behaviour accordingly, while
|
|
127
|
+
# ACNG might not support the expected features. Expect side effects.
|
|
128
|
+
#
|
|
129
|
+
# UserAgent: Yet Another HTTP Client/1.2.3p4
|
|
130
|
+
|
|
131
|
+
# In some cases the Import and Expiration tasks might create fresh volatile
|
|
132
|
+
# data for internal use by reconstructing them using patch files. This
|
|
133
|
+
# by-product might be recompressed with bzip2 and with some luck the resulting
|
|
134
|
+
# file becomes identical to the *.bz2 file on the server, usable for APT
|
|
135
|
+
# clients trying to fetch the full .bz2 compressed version. Injection of the
|
|
136
|
+
# generated files into the cache has however a disadvantage on underpowered
|
|
137
|
+
# servers: bzip2 compession can create high load on the server system and the
|
|
138
|
+
# visible download of the busy .bz2 files also becomes slower.
|
|
139
|
+
#
|
|
140
|
+
# RecompBz2: 0
|
|
141
|
+
|
|
142
|
+
# Network timeout for outgoing connections.
|
|
143
|
+
# NetworkTimeout: 60
|
|
144
|
+
|
|
145
|
+
# Sometimes it makes sense to not store the data in cache and just return the
|
|
146
|
+
# package data to client as it comes in. DontCache parameters can enable this
|
|
147
|
+
# behaviour for certain URL types. The tokens are extended regular expressions
|
|
148
|
+
# that URLs are matched against.
|
|
149
|
+
#
|
|
150
|
+
# DontCacheRequested is applied to the URL as it comes in from the client.
|
|
151
|
+
# Example: exclude packages built with kernel-package for x86
|
|
152
|
+
# DontCacheRequested: linux-.*_10\...\.Custo._i386
|
|
153
|
+
# Example usecase: exclude popular private IP ranges from caching
|
|
154
|
+
# DontCacheRequested: 192.168.0 ^10\..* 172.30
|
|
155
|
+
#
|
|
156
|
+
# DontCacheResolved is applied to URLs after mapping to the target server. If
|
|
157
|
+
# multiple backend servers are specified then it's only matched against the
|
|
158
|
+
# download link for the FIRST possible source (due to implementation limits).
|
|
159
|
+
# Example usecase: all Ubuntu stuff comes from a local mirror (specified as
|
|
160
|
+
# backend), don't cache it again:
|
|
161
|
+
# DontCacheResolved: ubuntumirror.local.net
|
|
162
|
+
#
|
|
163
|
+
# DontCache directive sets (overrides) both, DontCacheResolved and
|
|
164
|
+
# DontCacheRequested. Provided for convenience, see those directives for
|
|
165
|
+
# details.
|
|
166
|
+
#
|
|
167
|
+
# Default permission set of freshly created files and directories, as octal
|
|
168
|
+
# numbers (see chmod(1) for details).
|
|
169
|
+
# Can by limited by the umask value (see umask(2) for details) if it's set in
|
|
170
|
+
# the environment of the starting shell, e.g. in apt-cacher-ng init script or
|
|
171
|
+
# in its configuration file.
|
|
172
|
+
# DirPerms: 00755
|
|
173
|
+
# FilePerms: 00664
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// Automatically upgrade packages from these (origin:archive) pairs
|
|
2
|
+
Unattended-Upgrade::Allowed-Origins {
|
|
3
|
+
<% unless node['apt']['unattended_upgrades']['allowed_origins'].empty? -%>
|
|
4
|
+
<% node['apt']['unattended_upgrades']['allowed_origins'].each do |origin| -%>
|
|
5
|
+
"<%= origin %>";
|
|
6
|
+
<% end -%>
|
|
7
|
+
<% end -%>
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// List of packages to not update
|
|
12
|
+
Unattended-Upgrade::Package-Blacklist {
|
|
13
|
+
<% unless node['apt']['unattended_upgrades']['package_blacklist'].empty? -%>
|
|
14
|
+
<% node['apt']['unattended_upgrades']['package_blacklist'].each do |package| -%>
|
|
15
|
+
"<%= package %>";
|
|
16
|
+
<% end -%>
|
|
17
|
+
<% end -%>
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// This option allows you to control if on a unclean dpkg exit
|
|
21
|
+
// unattended-upgrades will automatically run
|
|
22
|
+
// dpkg --force-confold --configure -a
|
|
23
|
+
// The default is true, to ensure updates keep getting installed
|
|
24
|
+
Unattended-Upgrade::AutoFixInterruptedDpkg "<%= node['apt']['unattended_upgrades']['auto_fix_interrupted_dpkg'] ? 'true' : 'false' %>";
|
|
25
|
+
|
|
26
|
+
// Split the upgrade into the smallest possible chunks so that
|
|
27
|
+
// they can be interrupted with SIGUSR1. This makes the upgrade
|
|
28
|
+
// a bit slower but it has the benefit that shutdown while a upgrade
|
|
29
|
+
// is running is possible (with a small delay)
|
|
30
|
+
Unattended-Upgrade::MinimalSteps "<%= node['apt']['unattended_upgrades']['minimal_steps'] ? 'true' : 'false' %>";
|
|
31
|
+
|
|
32
|
+
// Install all unattended-upgrades when the machine is shuting down
|
|
33
|
+
// instead of doing it in the background while the machine is running
|
|
34
|
+
// This will (obviously) make shutdown slower
|
|
35
|
+
Unattended-Upgrade::InstallOnShutdown "<%= node['apt']['unattended_upgrades']['install_on_shutdown'] ? 'true' : 'false' %>";
|
|
36
|
+
|
|
37
|
+
// Send email to this address for problems or packages upgrades
|
|
38
|
+
// If empty or unset then no email is sent, make sure that you
|
|
39
|
+
// have a working mail setup on your system. A package that provides
|
|
40
|
+
// 'mailx' must be installed.
|
|
41
|
+
<% if node['apt']['unattended_upgrades']['mail'] -%>
|
|
42
|
+
Unattended-Upgrade::Mail "<%= node['apt']['unattended_upgrades']['mail'] %>";
|
|
43
|
+
<% end -%>
|
|
44
|
+
|
|
45
|
+
// Set this value to "true" to get emails only on errors. Default
|
|
46
|
+
// is to always send a mail if Unattended-Upgrade::Mail is set
|
|
47
|
+
Unattended-Upgrade::MailOnlyOnError "<%= node['apt']['unattended_upgrades']['mail_only_on_error'] ? 'true' : 'false' %>";
|
|
48
|
+
|
|
49
|
+
// Do automatic removal of new unused dependencies after the upgrade
|
|
50
|
+
// (equivalent to apt-get autoremove)
|
|
51
|
+
Unattended-Upgrade::Remove-Unused-Dependencies "<%= node['apt']['unattended_upgrades']['remove_unused_dependencies'] ? 'true' : 'false' %>";
|
|
52
|
+
|
|
53
|
+
// Automatically reboot *WITHOUT CONFIRMATION* if a
|
|
54
|
+
// the file /var/run/reboot-required is found after the upgrade
|
|
55
|
+
Unattended-Upgrade::Automatic-Reboot "<%= node['apt']['unattended_upgrades']['automatic_reboot'] ? 'true' : 'false' %>";
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
// Use apt bandwidth limit feature, this example limits the download
|
|
59
|
+
// speed to 70kb/sec
|
|
60
|
+
<% if node['apt']['unattended_upgrades']['dl_limit'] -%>
|
|
61
|
+
Acquire::http::Dl-Limit "<%= node['apt']['unattended_upgrades']['dl_limit'] %>";
|
|
62
|
+
<% end -%>
|