summaryrefslogtreecommitdiff
path: root/openstack
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2015-02-27 13:48:26 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2015-03-04 15:34:39 +0000
commit8ab8635791ce97f4335961248efe9b4ba47db756 (patch)
treed91f67350fe04b8e22758879c273af483a63a527 /openstack
parent0eee0bd1d006d2d4e1c4d926b3671504427d0cb4 (diff)
downloaddefinitions-8ab8635791ce97f4335961248efe9b4ba47db756.tar.gz
Add the beginnings of our swift ansible script
Note, the remote_user needs updating and we need be loading those vars from a file
Diffstat (limited to 'openstack')
-rw-r--r--openstack/manifest1
-rw-r--r--openstack/usr/share/openstack/swift.yml32
2 files changed, 33 insertions, 0 deletions
diff --git a/openstack/manifest b/openstack/manifest
index 1aa07981..3ea56994 100644
--- a/openstack/manifest
+++ b/openstack/manifest
@@ -163,3 +163,4 @@
0040755 0 0 /etc/swift
0100644 0 0 /etc/swift/proxy-server.conf
0100644 0 0 /etc/swift/swift.conf
+0100644 0 0 /usr/share/openstack/swift.yml
diff --git a/openstack/usr/share/openstack/swift.yml b/openstack/usr/share/openstack/swift.yml
new file mode 100644
index 00000000..dbc250e8
--- /dev/null
+++ b/openstack/usr/share/openstack/swift.yml
@@ -0,0 +1,32 @@
+---
+- hosts: devstack
+ vars:
+ swift_pass: insecure
+ KEYSTONE_TEMPORARY_ADMIN_TOKEN: a682f596-76f3-11e3-b3b2-e716f9080d50
+ SWIFT_ADMIN_URL: http://127.0.0.1:8080
+ SWIFT_INTERNAL_URL: http://127.0.0.1:8080/v1/AUTH_%(tenant_id)s
+ SWIFT_PUBLIC_URL: http://127.0.0.1:8080/v1/AUTH_%(tenant_id)s
+ remote_user: richardipsum
+ tasks:
+ - keystone_user: >
+ user=swift
+ password={{ swift_pass }}
+ tenant=service
+ token={{ KEYSTONE_TEMPORARY_ADMIN_TOKEN }}
+
+ - keystone_user: >
+ role=admin
+ user=swift
+ tenant=service
+ token={{ KEYSTONE_TEMPORARY_ADMIN_TOKEN }}
+
+ - keystone_service: >
+ name=swift
+ type=object-store
+ description="OpenStack Object Storage"
+ publicurl={{ SWIFT_PUBLIC_URL }}
+ internalurl={{ SWIFT_INTERNAL_URL
+ | default('http://127.0.0.1:8080/v1/AUTH_%(tenant_id)s') }}
+ adminurl={{ SWIFT_ADMIN_URL }}
+ region='RegionOne'
+ token={{ KEYSTONE_TEMPORARY_ADMIN_TOKEN }}