summaryrefslogtreecommitdiff
path: root/swift/usr/lib/systemd/system
diff options
context:
space:
mode:
Diffstat (limited to 'swift/usr/lib/systemd/system')
-rw-r--r--swift/usr/lib/systemd/system/swift-storage-setup.service11
-rw-r--r--swift/usr/lib/systemd/system/swift-storage.service12
2 files changed, 23 insertions, 0 deletions
diff --git a/swift/usr/lib/systemd/system/swift-storage-setup.service b/swift/usr/lib/systemd/system/swift-storage-setup.service
new file mode 100644
index 00000000..e284fbed
--- /dev/null
+++ b/swift/usr/lib/systemd/system/swift-storage-setup.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Run openstack-swift-storage-setup (once)
+After=local-fs.target postgres-server.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/ansible-playbook -v -i /usr/share/swift/hosts /usr/share/swift/swift-storage.yml
+Restart=no
+
+[Install]
+WantedBy=multi-user.target
diff --git a/swift/usr/lib/systemd/system/swift-storage.service b/swift/usr/lib/systemd/system/swift-storage.service
new file mode 100644
index 00000000..dc41d3bc
--- /dev/null
+++ b/swift/usr/lib/systemd/system/swift-storage.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=OpenStack Swift Storage
+After=syslog.target network.target swift-storage-setup.service
+
+[Service]
+Type=forking
+Restart=on-failure
+ExecStart=/usr/bin/swift-init all start
+ExecStop=/usr/bin/swift-init all stop
+
+[Install]
+WantedBy=multi-user.target