vagrant-managed-servers 0.1.0 → 0.2.0

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.
Files changed (137) hide show
  1. data/.gitignore +2 -1
  2. data/.travis.yml +5 -0
  3. data/Berksfile +1 -1
  4. data/CHANGELOG.md +7 -1
  5. data/Gemfile +8 -4
  6. data/README.md +5 -3
  7. data/Rakefile +11 -0
  8. data/Vagrantfile +3 -2
  9. data/lib/vagrant-managed-servers/action/sync_folders.rb +5 -3
  10. data/lib/vagrant-managed-servers/version.rb +1 -1
  11. data/vagrant-managed-servers.gemspec +3 -3
  12. metadata +10 -134
  13. data/cookbooks/apache2/CHANGELOG.md +0 -95
  14. data/cookbooks/apache2/CONTRIBUTING.md +0 -257
  15. data/cookbooks/apache2/Gemfile +0 -10
  16. data/cookbooks/apache2/LICENSE +0 -201
  17. data/cookbooks/apache2/README.md +0 -567
  18. data/cookbooks/apache2/attributes/default.rb +0 -149
  19. data/cookbooks/apache2/attributes/mod_auth_cas.rb +0 -2
  20. data/cookbooks/apache2/attributes/mod_auth_openid.rb +0 -32
  21. data/cookbooks/apache2/definitions/apache_conf.rb +0 -26
  22. data/cookbooks/apache2/definitions/apache_module.rb +0 -53
  23. data/cookbooks/apache2/definitions/apache_site.rb +0 -43
  24. data/cookbooks/apache2/definitions/web_app.rb +0 -49
  25. data/cookbooks/apache2/files/default/apache2_module_conf_generate.pl +0 -41
  26. data/cookbooks/apache2/files/default/tests/minitest/default_test.rb +0 -77
  27. data/cookbooks/apache2/files/default/tests/minitest/god_monitor_test.rb +0 -34
  28. data/cookbooks/apache2/files/default/tests/minitest/mod_apreq2_test.rb +0 -19
  29. data/cookbooks/apache2/files/default/tests/minitest/mod_auth_cas_test.rb +0 -11
  30. data/cookbooks/apache2/files/default/tests/minitest/mod_auth_openid_test.rb +0 -37
  31. data/cookbooks/apache2/files/default/tests/minitest/mod_cgi_test.rb +0 -13
  32. data/cookbooks/apache2/files/default/tests/minitest/mod_dav_svn_test.rb +0 -14
  33. data/cookbooks/apache2/files/default/tests/minitest/mod_fastcgi.rb +0 -11
  34. data/cookbooks/apache2/files/default/tests/minitest/mod_perl_test.rb +0 -18
  35. data/cookbooks/apache2/files/default/tests/minitest/mod_php5_test.rb +0 -13
  36. data/cookbooks/apache2/files/default/tests/minitest/mod_python_test.rb +0 -10
  37. data/cookbooks/apache2/files/default/tests/minitest/mod_ssl_test.rb +0 -23
  38. data/cookbooks/apache2/files/default/tests/minitest/support/helpers.rb +0 -50
  39. data/cookbooks/apache2/metadata.json +0 -513
  40. data/cookbooks/apache2/metadata.rb +0 -207
  41. data/cookbooks/apache2/recipes/default.rb +0 -208
  42. data/cookbooks/apache2/recipes/god_monitor.rb +0 -33
  43. data/cookbooks/apache2/recipes/logrotate.rb +0 -29
  44. data/cookbooks/apache2/recipes/mod_alias.rb +0 -22
  45. data/cookbooks/apache2/recipes/mod_apreq2.rb +0 -54
  46. data/cookbooks/apache2/recipes/mod_auth_basic.rb +0 -20
  47. data/cookbooks/apache2/recipes/mod_auth_cas.rb +0 -59
  48. data/cookbooks/apache2/recipes/mod_auth_digest.rb +0 -20
  49. data/cookbooks/apache2/recipes/mod_auth_openid.rb +0 -111
  50. data/cookbooks/apache2/recipes/mod_authn_file.rb +0 -20
  51. data/cookbooks/apache2/recipes/mod_authnz_ldap.rb +0 -20
  52. data/cookbooks/apache2/recipes/mod_authz_default.rb +0 -20
  53. data/cookbooks/apache2/recipes/mod_authz_groupfile.rb +0 -20
  54. data/cookbooks/apache2/recipes/mod_authz_host.rb +0 -20
  55. data/cookbooks/apache2/recipes/mod_authz_user.rb +0 -20
  56. data/cookbooks/apache2/recipes/mod_autoindex.rb +0 -22
  57. data/cookbooks/apache2/recipes/mod_cgi.rb +0 -20
  58. data/cookbooks/apache2/recipes/mod_dav.rb +0 -20
  59. data/cookbooks/apache2/recipes/mod_dav_fs.rb +0 -21
  60. data/cookbooks/apache2/recipes/mod_dav_svn.rb +0 -41
  61. data/cookbooks/apache2/recipes/mod_deflate.rb +0 -22
  62. data/cookbooks/apache2/recipes/mod_dir.rb +0 -22
  63. data/cookbooks/apache2/recipes/mod_env.rb +0 -20
  64. data/cookbooks/apache2/recipes/mod_expires.rb +0 -20
  65. data/cookbooks/apache2/recipes/mod_fastcgi.rb +0 -26
  66. data/cookbooks/apache2/recipes/mod_fcgid.rb +0 -55
  67. data/cookbooks/apache2/recipes/mod_headers.rb +0 -20
  68. data/cookbooks/apache2/recipes/mod_include.rb +0 -20
  69. data/cookbooks/apache2/recipes/mod_ldap.rb +0 -20
  70. data/cookbooks/apache2/recipes/mod_log_config.rb +0 -24
  71. data/cookbooks/apache2/recipes/mod_logio.rb +0 -24
  72. data/cookbooks/apache2/recipes/mod_mime.rb +0 -22
  73. data/cookbooks/apache2/recipes/mod_negotiation.rb +0 -22
  74. data/cookbooks/apache2/recipes/mod_perl.rb +0 -44
  75. data/cookbooks/apache2/recipes/mod_php5.rb +0 -77
  76. data/cookbooks/apache2/recipes/mod_proxy.rb +0 -22
  77. data/cookbooks/apache2/recipes/mod_proxy_ajp.rb +0 -21
  78. data/cookbooks/apache2/recipes/mod_proxy_balancer.rb +0 -20
  79. data/cookbooks/apache2/recipes/mod_proxy_connect.rb +0 -20
  80. data/cookbooks/apache2/recipes/mod_proxy_http.rb +0 -20
  81. data/cookbooks/apache2/recipes/mod_python.rb +0 -38
  82. data/cookbooks/apache2/recipes/mod_rewrite.rb +0 -20
  83. data/cookbooks/apache2/recipes/mod_setenvif.rb +0 -22
  84. data/cookbooks/apache2/recipes/mod_ssl.rb +0 -46
  85. data/cookbooks/apache2/recipes/mod_status.rb +0 -22
  86. data/cookbooks/apache2/recipes/mod_wsgi.rb +0 -38
  87. data/cookbooks/apache2/recipes/mod_xsendfile.rb +0 -38
  88. data/cookbooks/apache2/templates/default/a2dismod.erb +0 -22
  89. data/cookbooks/apache2/templates/default/a2dissite.erb +0 -29
  90. data/cookbooks/apache2/templates/default/a2enmod.erb +0 -37
  91. data/cookbooks/apache2/templates/default/a2ensite.erb +0 -38
  92. data/cookbooks/apache2/templates/default/apache2.conf.erb +0 -237
  93. data/cookbooks/apache2/templates/default/apache2.god.erb +0 -19
  94. data/cookbooks/apache2/templates/default/charset.erb +0 -6
  95. data/cookbooks/apache2/templates/default/default-site.erb +0 -57
  96. data/cookbooks/apache2/templates/default/mods/README +0 -2
  97. data/cookbooks/apache2/templates/default/mods/alias.conf.erb +0 -24
  98. data/cookbooks/apache2/templates/default/mods/auth_cas.conf.erb +0 -1
  99. data/cookbooks/apache2/templates/default/mods/auth_cas.load.erb +0 -1
  100. data/cookbooks/apache2/templates/default/mods/authopenid.load.erb +0 -1
  101. data/cookbooks/apache2/templates/default/mods/autoindex.conf.erb +0 -101
  102. data/cookbooks/apache2/templates/default/mods/deflate.conf.erb +0 -16
  103. data/cookbooks/apache2/templates/default/mods/dir.conf.erb +0 -5
  104. data/cookbooks/apache2/templates/default/mods/fastcgi.conf.erb +0 -5
  105. data/cookbooks/apache2/templates/default/mods/fcgid.conf.erb +0 -10
  106. data/cookbooks/apache2/templates/default/mods/mime.conf.erb +0 -198
  107. data/cookbooks/apache2/templates/default/mods/negotiation.conf.erb +0 -18
  108. data/cookbooks/apache2/templates/default/mods/php5.conf.erb +0 -16
  109. data/cookbooks/apache2/templates/default/mods/proxy.conf.erb +0 -19
  110. data/cookbooks/apache2/templates/default/mods/setenvif.conf.erb +0 -28
  111. data/cookbooks/apache2/templates/default/mods/ssl.conf.erb +0 -76
  112. data/cookbooks/apache2/templates/default/mods/status.conf.erb +0 -26
  113. data/cookbooks/apache2/templates/default/port_apache.erb +0 -2
  114. data/cookbooks/apache2/templates/default/ports.conf.erb +0 -6
  115. data/cookbooks/apache2/templates/default/security.erb +0 -50
  116. data/cookbooks/apache2/templates/default/web_app.conf.erb +0 -43
  117. data/cookbooks/apt/Berksfile +0 -8
  118. data/cookbooks/apt/CHANGELOG.md +0 -97
  119. data/cookbooks/apt/CONTRIBUTING +0 -29
  120. data/cookbooks/apt/LICENSE +0 -201
  121. data/cookbooks/apt/README.md +0 -243
  122. data/cookbooks/apt/TESTING.md +0 -25
  123. data/cookbooks/apt/attributes/default.rb +0 -4
  124. data/cookbooks/apt/files/default/apt-proxy-v2.conf +0 -50
  125. data/cookbooks/apt/metadata.json +0 -1
  126. data/cookbooks/apt/metadata.rb +0 -30
  127. data/cookbooks/apt/providers/preference.rb +0 -61
  128. data/cookbooks/apt/providers/repository.rb +0 -132
  129. data/cookbooks/apt/recipes/cacher-client.rb +0 -59
  130. data/cookbooks/apt/recipes/cacher-ng.rb +0 -40
  131. data/cookbooks/apt/recipes/default.rb +0 -68
  132. data/cookbooks/apt/resources/preference.rb +0 -30
  133. data/cookbooks/apt/resources/repository.rb +0 -40
  134. data/cookbooks/apt/templates/debian-6.0/acng.conf.erb +0 -174
  135. data/cookbooks/apt/templates/default/01proxy.erb +0 -2
  136. data/cookbooks/apt/templates/default/acng.conf.erb +0 -276
  137. data/cookbooks/apt/templates/ubuntu-10.04/acng.conf.erb +0 -270
@@ -1,132 +0,0 @@
1
- #
2
- # Cookbook Name:: apt
3
- # Provider:: repository
4
- #
5
- # Copyright 2010-2011, 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
- use_inline_resources
21
-
22
- def whyrun_supported?
23
- true
24
- end
25
-
26
- # install apt key from keyserver
27
- def install_key_from_keyserver(key, keyserver)
28
- execute "install-key #{key}" do
29
- if !node['apt']['key_proxy'].empty?
30
- command "apt-key adv --keyserver-options http-proxy=#{node['apt']['key_proxy']} --keyserver #{keyserver} --recv #{key}"
31
- else
32
- command "apt-key adv --keyserver #{keyserver} --recv #{key}"
33
- end
34
- action :run
35
- not_if "apt-key list | grep #{key}"
36
- end
37
- end
38
-
39
- # run command and extract gpg ids
40
- def extract_gpg_ids_from_cmd(cmd)
41
- so = Mixlib::ShellOut.new(cmd)
42
- so.run_command
43
- so.stdout.split(/\n/).collect do |t|
44
- if z = t.match(/^pub\s+\d+\w\/([0-9A-F]{8})/)
45
- z[1]
46
- end
47
- end.compact
48
- end
49
-
50
- # install apt key from URI
51
- def install_key_from_uri(uri)
52
- key_name = uri.split(/\//).last
53
- cached_keyfile = "#{Chef::Config[:file_cache_path]}/#{key_name}"
54
- if new_resource.key =~ /http/
55
- remote_file cached_keyfile do
56
- source new_resource.key
57
- mode 00644
58
- action :create
59
- end
60
- else
61
- cookbook_file cached_keyfile do
62
- source new_resource.key
63
- cookbook new_resource.cookbook
64
- mode 00644
65
- action :create
66
- end
67
- end
68
-
69
- execute "install-key #{key_name}" do
70
- command "apt-key add #{cached_keyfile}"
71
- action :run
72
- not_if do
73
- installed_ids = extract_gpg_ids_from_cmd("apt-key finger")
74
- key_ids = extract_gpg_ids_from_cmd("gpg --with-fingerprint #{cached_keyfile}")
75
- (installed_ids & key_ids).sort == key_ids.sort
76
- end
77
- end
78
- end
79
-
80
- # build repo file contents
81
- def build_repo(uri, distribution, components, arch, add_deb_src)
82
- components = components.join(' ') if components.respond_to?(:join)
83
- repo_info = "#{uri} #{distribution} #{components}\n"
84
- repo_info = "[arch=#{arch}] #{repo_info}" if arch
85
- repo = "deb #{repo_info}"
86
- repo << "deb-src #{repo_info}" if add_deb_src
87
- repo
88
- end
89
-
90
- action :add do
91
- # add key
92
- if new_resource.keyserver && new_resource.key
93
- install_key_from_keyserver(new_resource.key, new_resource.keyserver)
94
- elsif new_resource.key
95
- install_key_from_uri(new_resource.key)
96
- end
97
-
98
- file "/var/lib/apt/periodic/update-success-stamp" do
99
- action :nothing
100
- end
101
-
102
- execute "apt-get update" do
103
- ignore_failure true
104
- action :nothing
105
- end
106
-
107
- # build repo file
108
- repository = build_repo(new_resource.uri,
109
- new_resource.distribution,
110
- new_resource.components,
111
- new_resource.arch,
112
- new_resource.deb_src)
113
-
114
- file "/etc/apt/sources.list.d/#{new_resource.name}.list" do
115
- owner "root"
116
- group "root"
117
- mode 00644
118
- content repository
119
- action :create
120
- notifies :delete, "file[/var/lib/apt/periodic/update-success-stamp]", :immediately
121
- notifies :run, "execute[apt-get update]", :immediately if new_resource.cache_rebuild
122
- end
123
- end
124
-
125
- action :remove do
126
- if ::File.exists?("/etc/apt/sources.list.d/#{new_resource.name}.list")
127
- Chef::Log.info "Removing #{new_resource.name} repository from /etc/apt/sources.list.d/"
128
- file "/etc/apt/sources.list.d/#{new_resource.name}.list" do
129
- action :delete
130
- end
131
- end
132
- end
@@ -1,59 +0,0 @@
1
- #
2
- # Cookbook Name:: apt
3
- # Recipe:: cacher-client
4
- #
5
- # Copyright 2011, 2012 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
- #remove Acquire::http::Proxy lines from /etc/apt/apt.conf since we use 01proxy
21
- #these are leftover from preseed installs
22
- execute 'Remove proxy from /etc/apt/apt.conf' do
23
- command "sed --in-place '/^Acquire::http::Proxy/d' /etc/apt/apt.conf"
24
- only_if "grep Acquire::http::Proxy /etc/apt/apt.conf"
25
- end
26
-
27
- servers = []
28
- if node['apt'] && node['apt']['cacher_ipaddress']
29
- cacher = Chef::Node.new
30
- cacher.name(node['apt']['cacher_ipaddress'])
31
- cacher.set['ipaddress'] = node['apt']['cacher_ipaddress']
32
- servers << cacher
33
- end
34
-
35
- unless Chef::Config[:solo]
36
- query = "apt_caching_server:true NOT name:#{node.name}"
37
- query += " AND chef_environment:#{node.chef_environment}" if node['apt']['cacher-client']['restrict_environment']
38
- Chef::Log.debug("apt::cacher-client searching for '#{query}'")
39
- servers += search(:node, query)
40
- end
41
-
42
- if servers.length > 0
43
- Chef::Log.info("apt-cacher-ng server found on #{servers[0]}.")
44
- template '/etc/apt/apt.conf.d/01proxy' do
45
- source '01proxy.erb'
46
- owner 'root'
47
- group 'root'
48
- mode 00644
49
- variables(
50
- :proxy => servers[0]['ipaddress'],
51
- :port => node['apt']['cacher_port']
52
- )
53
- end.run_action(:create)
54
- else
55
- Chef::Log.info('No apt-cacher-ng server found.')
56
- file '/etc/apt/apt.conf.d/01proxy' do
57
- action :delete
58
- end
59
- end
@@ -1,40 +0,0 @@
1
- #
2
- # Cookbook Name:: apt
3
- # Recipe:: cacher-ng
4
- #
5
- # Copyright 2008-2012, 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
- node.set['apt']['caching_server'] = true
21
-
22
- package "apt-cacher-ng" do
23
- action :install
24
- end
25
-
26
- template "/etc/apt-cacher-ng/acng.conf" do
27
- source "acng.conf.erb"
28
- owner "root"
29
- group "root"
30
- mode 00644
31
- notifies :restart, "service[apt-cacher-ng]"
32
- end
33
-
34
- service "apt-cacher-ng" do
35
- supports :restart => true, :status => false
36
- action [:enable, :start]
37
- end
38
-
39
- #this will help seed the proxy
40
- include_recipe "apt::cacher-client"
@@ -1,68 +0,0 @@
1
- #
2
- # Cookbook Name:: apt
3
- # Recipe:: default
4
- #
5
- # Copyright 2008-2011, 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
- # Run apt-get update to create the stamp file
22
- execute "apt-get-update" do
23
- command "apt-get update"
24
- ignore_failure true
25
- not_if do ::File.exists?('/var/lib/apt/periodic/update-success-stamp') end
26
- end
27
-
28
- # For other recipes to call to force an update
29
- execute "apt-get update" do
30
- command "apt-get update"
31
- ignore_failure true
32
- action :nothing
33
- end
34
-
35
- # Automatically remove packages that are no longer needed for dependencies
36
- execute "apt-get autoremove" do
37
- command "apt-get -y autoremove"
38
- action :nothing
39
- end
40
-
41
- # Automatically remove .deb files for packages no longer on your system
42
- execute "apt-get autoclean" do
43
- command "apt-get -y autoclean"
44
- action :nothing
45
- end
46
-
47
- # provides /var/lib/apt/periodic/update-success-stamp on apt-get update
48
- package "update-notifier-common" do
49
- notifies :run, 'execute[apt-get-update]', :immediately
50
- end
51
-
52
- execute "apt-get-update-periodic" do
53
- command "apt-get update"
54
- ignore_failure true
55
- only_if do
56
- ::File.exists?('/var/lib/apt/periodic/update-success-stamp') &&
57
- ::File.mtime('/var/lib/apt/periodic/update-success-stamp') < Time.now - 86400
58
- end
59
- end
60
-
61
- %w{/var/cache/local /var/cache/local/preseeding}.each do |dirname|
62
- directory dirname do
63
- owner "root"
64
- group "root"
65
- mode 00755
66
- action :create
67
- end
68
- end
@@ -1,30 +0,0 @@
1
- #
2
- # Cookbook Name:: apt
3
- # Resource:: preference
4
- #
5
- # Copyright 2010-2011, 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
-
22
- def initialize(*args)
23
- super
24
- @action = :add
25
- end
26
-
27
- attribute :package_name, :kind_of => String, :name_attribute => true
28
- attribute :glob, :kind_of => String
29
- attribute :pin, :kind_of => String
30
- attribute :pin_priority, :kind_of => String
@@ -1,40 +0,0 @@
1
- #
2
- # Cookbook Name:: apt
3
- # Resource:: repository
4
- #
5
- # Copyright 2010-2011, 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
-
22
- def initialize(*args)
23
- super
24
- @action = :add
25
- end
26
-
27
- #name of the repo, used for source.list filename
28
- attribute :repo_name, :kind_of => String, :name_attribute => true
29
- attribute :uri, :kind_of => String
30
- attribute :distribution, :kind_of => String
31
- attribute :components, :kind_of => Array, :default => []
32
- attribute :arch, :kind_of => String, :default => nil
33
- #whether or not to add the repository as a source repo as well
34
- attribute :deb_src, :default => false
35
- attribute :keyserver, :kind_of => String, :default => nil
36
- attribute :key, :kind_of => String, :default => nil
37
- attribute :cookbook, :kind_of => String, :default => nil
38
- #trigger cache rebuild
39
- #If not you can trigger in the recipe itself after checking the status of resource.updated{_by_last_action}?
40
- attribute :cache_rebuild, :kind_of => [TrueClass, FalseClass], :default => true
@@ -1,174 +0,0 @@
1
-
2
- # Letter case in directive names does not matter. Must be separated with colons.
3
- # Valid boolean values are a zero number for false, non-zero numbers for true.
4
-
5
- CacheDir: /var/cache/apt-cacher-ng
6
-
7
- # set empty to disable logging
8
- LogDir: /var/log/apt-cacher-ng
9
-
10
- # TCP (http) port
11
- # Set to 9999 to emulate apt-proxy
12
- Port:<%= node['apt']['cacher_port'] %>
13
-
14
- # Addresses or hostnames to listen on. Multiple addresses must be separated by
15
- # spaces. Each entry must be associated with a local interface. DNS resolution
16
- # is performed using getaddrinfo(3) for all available protocols (i.e. IPv4 and
17
- # IPv6 if available).
18
- #
19
- # Default: not set, will listen on all interfaces.
20
- #
21
- # BindAddress: localhost 192.168.7.254 publicNameOnMainInterface
22
-
23
- #Proxy: http://www-proxy.example.net:80
24
- #proxy: http://username:proxypassword@proxy.example.net:3128
25
-
26
- # Repository remapping. See manual for details.
27
- # In this example, backends file is generated during package installation.
28
- Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian
29
- Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu
30
- Remap-debvol: file:debvol_mirror*.gz /debian-volatile ; file:backends_debvol
31
- Remap-cygwin: file:cygwin_mirrors /cygwin # ; file:backends_cygwin # incomplete, please create this file
32
-
33
- # Virtual page accessible in a web browser to see statistics and status
34
- # information, i.e. under http://localhost:3142/acng-report.html
35
- ReportPage: acng-report.html
36
-
37
- # Socket file for accessing through local UNIX socket instead of TCP/IP. Can be
38
- # used with inetd bridge or cron client.
39
- # SocketPath:/var/run/apt-cacher-ng/socket
40
-
41
- # Forces log file to be written to disk after every line when set to 1. Default
42
- # is 0, buffer flush happens after client disconnects.
43
- #
44
- # (technically, this is an alias to the Debug option provided for convenience)
45
- #
46
- # UnbufferLogs: 0
47
-
48
- # Set to 0 to store only type, time and transfer sizes.
49
- # 1 -> client IP and relative local path are logged too
50
- # VerboseLog: 1
51
-
52
- # Don't detach from the console
53
- # ForeGround: 0
54
-
55
- # Store the pid of the daemon process therein
56
- # PidFile: /var/run/apt-cacher-ng/pid
57
-
58
- # Forbid outgoing connections, work around them or respond with 503 error
59
- # offlinemode:0
60
-
61
- # Forbid all downloads that don't run through preconfigured backends (.where)
62
- #ForceManaged: 0
63
-
64
- # Days before considering an unreferenced file expired (to be deleted).
65
- # Warning: if the value is set too low and particular index files are not
66
- # available for some days (mirror downtime) there is a risk of deletion of
67
- # still usefull package files.
68
- ExTreshold: 4
69
-
70
- # Stop expiration when a critical problem appeared. Currently only failed
71
- # refresh of an index file is considered as critical.
72
- #
73
- # WARNING: don't touch this option or set to a non-zero number.
74
- # Anything else is DANGEROUS and may cause data loss.
75
- #
76
- # ExAbortOnProblems: 1
77
-
78
- # Replace some Windows/DOS-FS incompatible chars when storing
79
- # StupidFs: 0
80
-
81
- # Experimental feature for apt-listbugs: pass-through SOAP requests and
82
- # responses to/from bugs.debian.org. If not set, default is true if
83
- # ForceManaged is enabled and false otherwise.
84
- # ForwardBtsSoap: 1
85
-
86
- # The daemon has a small cache for DNS data, to speed up resolution. The
87
- # expiration time of the DNS entries can be configured in seconds.
88
- # DnsCacheSeconds: 3600
89
-
90
- # Don't touch the following values without good consideration!
91
- #
92
- # Max. count of connection threads kept ready (for faster response in the
93
- # future). Should be a sane value between 0 and average number of connections,
94
- # and depend on the amount of spare RAM.
95
- # MaxStandbyConThreads: 8
96
- #
97
- # Hard limit of active thread count for incomming connections, i.e. operation
98
- # is refused when this value is reached (below zero = unlimited).
99
- # MaxConThreads: -1
100
- #
101
- #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)$
102
- #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(\\?.*)?)$
103
- # Whitelist for expiration, file types not to be removed even when being
104
- # unreferenced. Default: same as VfilePattern which is a safe bed. When and
105
- # only when the only used mirrors are official repositories (with working
106
- # Release files) then it might be set to something more restrictive, like
107
- # (^|.*?/)(Release|Release\.gpg|release|meta-release|Translation[^/]*\.bz2)$
108
- #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)$
109
-
110
- # Higher modes only working with the debug version
111
- # Warning, writes a lot into apt-cacher.err logfile
112
- # Value overwrites UnbufferLogs setting (aliased)
113
- # Debug:3
114
-
115
- # Usually, general purpose proxies like Squid expose the IP adress of the
116
- # client user to the remote server using the X-Forwarded-For HTTP header. This
117
- # behaviour can be optionally turned on with the Expose-Origin option.
118
- # ExposeOrigin: 0
119
-
120
- # When logging the originating IP address, trust the information supplied by
121
- # the client in the X-Forwarded-For header.
122
- # LogSubmittedOrigin: 0
123
-
124
- # The version string reported to the peer, to be displayed as HTTP client (and
125
- # version) in the logs of the mirror.
126
- # WARNING: some archives use this header to detect/guess capabilities of the
127
- # client (i.e. redirection support) and change the behaviour accordingly, while
128
- # ACNG might not support the expected features. Expect side effects.
129
- #
130
- # UserAgent: Yet Another HTTP Client/1.2.3p4
131
-
132
- # In some cases the Import and Expiration tasks might create fresh volatile
133
- # data for internal use by reconstructing them using patch files. This
134
- # by-product might be recompressed with bzip2 and with some luck the resulting
135
- # file becomes identical to the *.bz2 file on the server, usable for APT
136
- # clients trying to fetch the full .bz2 compressed version. Injection of the
137
- # generated files into the cache has however a disadvantage on underpowered
138
- # servers: bzip2 compession can create high load on the server system and the
139
- # visible download of the busy .bz2 files also becomes slower.
140
- #
141
- # RecompBz2: 0
142
-
143
- # Network timeout for outgoing connections.
144
- # NetworkTimeout: 60
145
-
146
- # Sometimes it makes sense to not store the data in cache and just return the
147
- # package data to client as it comes in. DontCache parameters can enable this
148
- # behaviour for certain URL types. The tokens are extended regular expressions
149
- # that URLs are matched against.
150
- #
151
- # DontCacheRequested is applied to the URL as it comes in from the client.
152
- # Example: exclude packages built with kernel-package for x86
153
- # DontCacheRequested: linux-.*_10\...\.Custo._i386
154
- # Example usecase: exclude popular private IP ranges from caching
155
- # DontCacheRequested: 192.168.0 ^10\..* 172.30
156
- #
157
- # DontCacheResolved is applied to URLs after mapping to the target server. If
158
- # multiple backend servers are specified then it's only matched against the
159
- # download link for the FIRST possible source (due to implementation limits).
160
- # Example usecase: all Ubuntu stuff comes from a local mirror (specified as
161
- # backend), don't cache it again:
162
- # DontCacheResolved: ubuntumirror.local.net
163
- #
164
- # DontCache directive sets (overrides) both, DontCacheResolved and
165
- # DontCacheRequested. Provided for convenience, see those directives for
166
- # details.
167
- #
168
- # Default permission set of freshly created files and directories, as octal
169
- # numbers (see chmod(1) for details).
170
- # Can by limited by the umask value (see umask(2) for details) if it's set in
171
- # the environment of the starting shell, e.g. in apt-cacher-ng init script or
172
- # in its configuration file.
173
- # DirPerms: 00755
174
- # FilePerms: 00664
@@ -1,2 +0,0 @@
1
- Acquire::http::Proxy "http://<%= @proxy %>:<%= @port %>";
2
- Acquire::https::Proxy "DIRECT";