]> git.openstreetmap.org Git - chef.git/blobdiff - roles/backup.rb
Add a cookbook to configure the backup server
[chef.git] / roles / backup.rb
diff --git a/roles/backup.rb b/roles/backup.rb
new file mode 100644 (file)
index 0000000..852a46a
--- /dev/null
@@ -0,0 +1,37 @@
+name "backup"
+description "Role applied to backup.openstreetmap.org"
+
+default_attributes(
+  :accounts => {
+    :users => {
+      :osmbackup => { :status => :role }
+    }
+  },
+  :rsyncd => {
+    :modules => {
+      :backup => {
+        :comment => "Backups",
+        :path => "/store/backup",
+        :read_only => false,
+        :write_only => true,
+        :list => false,
+        :uid => "osmbackup",
+        :gid => "osmbackup",
+        :transfer_logging => false,
+        :hosts_allow => [
+          "128.40.168.0/24",      # ucl external
+          "146.179.159.160/27",   # ic internal
+          "193.63.75.96/27",      # ic external
+          "2001:630:12:500::/64", # ic external
+          "127.0.0.0/8",          # localhost
+          "::1"                   # localhost
+        ]
+      }
+    }
+  }
+)
+
+run_list(
+  "recipe[rsyncd]",
+  "recipe[backup]"
+)