summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2015-03-17 08:17:56 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2015-03-17 13:35:20 +0000
commit0b84f78477ad804c3663f404643e9db4ed537578 (patch)
treec01f24f31e4550c28a95c7da19e039a264e9372d
parent094d95267a35b9b154b8710e112367f0433217c3 (diff)
downloaddefinitions-0b84f78477ad804c3663f404643e9db4ed537578.tar.gz
Add a playbook to configure a swift storage node
-rw-r--r--openstack/manifest1
-rw-r--r--openstack/usr/share/openstack/swift-storage.yml24
2 files changed, 25 insertions, 0 deletions
diff --git a/openstack/manifest b/openstack/manifest
index 3e74b11b..cbe18b70 100644
--- a/openstack/manifest
+++ b/openstack/manifest
@@ -162,6 +162,7 @@
0100644 0 0 /etc/hosts
0100644 0 0 /usr/share/openstack/hosts
0100644 0 0 /usr/share/openstack/swift-controller.yml
+0100644 0 0 /usr/share/openstack/swift-storage.yml
0040755 0 0 /usr/share/swift
0040755 0 0 /usr/share/swift/etc
0040755 0 0 /usr/share/swift/etc/swift
diff --git a/openstack/usr/share/openstack/swift-storage.yml b/openstack/usr/share/openstack/swift-storage.yml
new file mode 100644
index 00000000..4711198b
--- /dev/null
+++ b/openstack/usr/share/openstack/swift-storage.yml
@@ -0,0 +1,24 @@
+---
+- hosts: localhost
+ vars_files:
+ - swift-vars.yml
+ vars:
+ remote_user: root
+ tasks:
+ - user: name=swift comment="Swift user"
+ - file: path=/etc/swift owner=swift group=swift state=directory
+
+ - template: src=/usr/share/swift/etc/rsyncd.j2 dest=/etc/rsyncd.conf
+ mode=0644 owner=swift group=swift
+
+ - template: src=/usr/share/swift/etc/swift/{{ item }}.j2
+ dest=/etc/swift/{{ item }}.conf mode=0644 owner=swift group=swift
+ with_items:
+ - account-server
+ - container-server
+ - object-server
+ - swift
+
+ - file: path=/srv/node owner=swift group=swift recurse=yes
+ - file: path=/var/cache/swift owner=swift group=swift state=directory
+ recurse=yes