summaryrefslogtreecommitdiff
path: root/openstack
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2015-03-06 16:12:13 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2015-03-06 16:12:13 +0000
commit228d0f865a3189fe2f52121be38ebbfb6435ebf6 (patch)
tree1a176831d64f37647a20f9e80bc349a36f629407 /openstack
parent689b17c4b7d5708319b154725ec22c8c2c4be532 (diff)
downloaddefinitions-228d0f865a3189fe2f52121be38ebbfb6435ebf6.tar.gz
swift-controller.yml: rename
Diffstat (limited to 'openstack')
-rw-r--r--openstack/usr/share/openstack/swift-controller.yml17
1 files changed, 9 insertions, 8 deletions
diff --git a/openstack/usr/share/openstack/swift-controller.yml b/openstack/usr/share/openstack/swift-controller.yml
index 5114de5c..f53d98df 100644
--- a/openstack/usr/share/openstack/swift-controller.yml
+++ b/openstack/usr/share/openstack/swift-controller.yml
@@ -3,7 +3,7 @@
vars_files:
- swift-vars.yml
vars:
- - rings: ['account', 'container', 'object']
+ - ring_names: ['account', 'container', 'object']
remote_user: root
tasks:
- user: name=swift comment="Swift user"
@@ -32,30 +32,31 @@
region='RegionOne'
token={{ KEYSTONE_TEMPORARY_ADMIN_TOKEN }}
+ - name: Determine which rings are present
- shell: test -f /etc/swift/{{ item }}.ring.gz
- with_items: rings
- register: rings-exist
+ with_items: ring_names
+ register: rings
- name: Create ring
shell: swift-ring-builder {{ item.item }}.builder create {{ SWIFT_PART_POWER }}
{{ SWIFT_REPLICAS }} {{ SWIFT_MIN_PART_HOURS }}
- when: item.rc != 0
- with_items: rings-exist.results
+ when: item.rc != 0 # if not already present
+ with_items: rings.results
- name: Add each storage node to the ring
shell: swift-ring-builder {{ item[0].item }}.builder
add r1z1-{{ item[1].ip }}:6002/{{ item[1].device }} {{ item[1].weight }}
when: item[0].rc != 0
with_nested:
- - rings-exist.results
+ - rings.results
- SWIFT_STORAGE_DEVICES
- name: Rebalance the ring
shell: swift-ring-builder {{ item.item }}.builder rebalance
when: item.rc != 0
- with_items: rings-exist.results
+ with_items: rings.results
- name: Distribute ring configuration files
shell: cp {{ item.item }}.ring.gz /etc/swift
when: item.rc != 0
- with_items: rings-exist.results
+ with_items: rings.results