summaryrefslogtreecommitdiff
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-02-27 13:48:26 +0000
commita9c18192d6df08b2b0490af81720c59f705dd1e9 (patch)
treec6794534bc48979777358c28c2903c6009d14fcc
parentfdfdea21b2f502fa9c3787edfab6aebb50208b8a (diff)
downloaddefinitions-a9c18192d6df08b2b0490af81720c59f705dd1e9.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
-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 861f51f9..0d3b5bb9 100644
--- a/openstack/manifest
+++ b/openstack/manifest
@@ -164,3 +164,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 }}