- ftp
- geodns
- geoipupdate
+ - git
+ - git-server
+ - git-web
- gps-tile
- hardware
- incron
- name: geoipupdate
run_list:
- recipe[geoipupdate::default]
+ - name: git
+ run_list:
+ - recipe[git::default]
+ - name: git-server
+ run_list:
+ - recipe[git::server]
+ - name: git-web
+ run_list:
+ - recipe[git::web]
- name: gps-tile
run_list:
- recipe[gps-tile::default]
+default[:git][:host] = "git.openstreetmap.org"
default[:git][:directory] = "/var/lib/git"
default[:git][:public_user] = "git"
default[:git][:public_group] = "git"
default[:git][:private_user] = "git"
default[:git][:private_group] = "git"
+default[:git][:private_nodes] = "fqdn:*"
version "1.0.0"
supports "ubuntu"
+depends "accounts"
depends "apache"
depends "networking"
# limitations under the License.
#
+node.default[:accounts][:users][:git][:status] = :role
+
+include_recipe "accounts"
include_recipe "networking"
git_directory = node[:git][:directory]
<Location />
Require all granted
</Location>
+<% unless @private_allowed.empty? -%>
<Location /private>
Require ip <%= @private_allowed.sort.join(" ") %>
</Location>
+<% end -%>
<Location /private/chef.git>
Require all denied
default_attributes(
:git => {
:private_user => "chefrepo",
- :private_group => "chefrepo",
- :private_nodes => "fqdn:*"
+ :private_group => "chefrepo"
},
:networking => {
:interfaces => {
--- /dev/null
+{
+ "id": "git",
+ "uid": "508",
+ "comment": "git.openstreetmap.org",
+ "home": "/var/lib/git"
+}
--- /dev/null
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("apache2") do
+ it { should be_installed }
+end
+
+describe service("apache2") do
+ it { should be_enabled }
+ it { should be_running }
+end
+
+describe port(80) do
+ it { should be_listening.with("tcp") }
+end
+
+describe port(443) do
+ it { should be_listening.with("tcp") }
+end
--- /dev/null
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("gitweb") do
+ it { should be_installed }
+end
--- /dev/null
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("git") do
+ it { should be_installed }
+end