From 92f6ca7bb6d7b2f295406aab34094b1dba76ff94 Mon Sep 17 00:00:00 2001 From: liyuenan Date: Tue, 27 Dec 2016 17:44:34 +0800 Subject: Yamllint test JIRA: COMPASS-516 Change-Id: I482ce9bc86f4f963258c5b8823e0b00e83556eef Signed-off-by: liyuenan --- .../roles/swift/tasks/swift-controller2.yml | 39 +++++++++++++--------- 1 file changed, 23 insertions(+), 16 deletions(-) (limited to 'deploy/adapters/ansible/roles/swift/tasks/swift-controller2.yml') diff --git a/deploy/adapters/ansible/roles/swift/tasks/swift-controller2.yml b/deploy/adapters/ansible/roles/swift/tasks/swift-controller2.yml index 92d4ab22..75e77882 100644 --- a/deploy/adapters/ansible/roles/swift/tasks/swift-controller2.yml +++ b/deploy/adapters/ansible/roles/swift/tasks/swift-controller2.yml @@ -7,17 +7,20 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## --- - - name: create account.builder file shell: > - cd /etc/swift ; + cd /etc/swift; swift-ring-builder account.builder create 10 3 1; - name: add each storage node to the ring shell: > cd /etc/swift; - swift-ring-builder account.builder add --region 1 --zone 1 --ip {{ ip_settings[item.1]['mgmt']['ip'] }} --port 6002 --device swift1 --weight 100 ; - swift-ring-builder account.builder add --region 1 --zone 1 --ip {{ ip_settings[item.1]['mgmt']['ip'] }} --port 6002 --device swift2 --weight 100 ; + swift-ring-builder account.builder add --region 1 --zone 1 \ + --ip {{ ip_settings[item.1]['mgmt']['ip'] }} --port 6002 \ + --device swift1 --weight 100 ; + swift-ring-builder account.builder add --region 1 --zone 1 \ + --ip {{ ip_settings[item.1]['mgmt']['ip'] }} --port 6002 \ + --device swift2 --weight 100 ; with_indexed_items: groups['compute'] - name: verify the ring contents 1 @@ -30,8 +33,6 @@ cd /etc/swift; swift-ring-builder account.builder rebalance; - -##################### - name: create contrainer builder file shell: > cd /etc/swift; @@ -40,8 +41,12 @@ - name: add each storage node to the ring shell: > cd /etc/swift; - swift-ring-builder container.builder add --region 1 --zone 1 --ip {{ ip_settings[item.1]['mgmt']['ip'] }} --port 6001 --device swift1 --weight 100; - swift-ring-builder container.builder add --region 1 --zone 1 --ip {{ ip_settings[item.1]['mgmt']['ip'] }} --port 6001 --device swift2 --weight 100; + swift-ring-builder container.builder add --region 1 --zone 1 \ + --ip {{ ip_settings[item.1]['mgmt']['ip'] }} --port 6001 \ + --device swift1 --weight 100; + swift-ring-builder container.builder add --region 1 --zone 1 \ + --ip {{ ip_settings[item.1]['mgmt']['ip'] }} --port 6001 \ + --device swift2 --weight 100; with_indexed_items: groups['compute'] - name: verify the ring contents 2 @@ -54,8 +59,6 @@ cd /etc/swift; swift-ring-builder container.builder rebalance; -############################# - - name: create object builder file shell: > cd /etc/swift; @@ -64,8 +67,12 @@ - name: add each storage node to the ring shell: > cd /etc/swift; - swift-ring-builder object.builder add --region 1 --zone 1 --ip {{ ip_settings[item.1]['mgmt']['ip'] }} --port 6000 --device swift1 --weight 100; - swift-ring-builder object.builder add --region 1 --zone 1 --ip {{ ip_settings[item.1]['mgmt']['ip'] }} --port 6000 --device swift2 --weight 100; + swift-ring-builder object.builder add --region 1 --zone 1 \ + --ip {{ ip_settings[item.1]['mgmt']['ip'] }} --port 6000 \ + --device swift1 --weight 100; + swift-ring-builder object.builder add --region 1 --zone 1 \ + --ip {{ ip_settings[item.1]['mgmt']['ip'] }} --port 6000 \ + --device swift2 --weight 100; with_indexed_items: groups['compute'] - name: verify the ring contents @@ -78,16 +85,16 @@ cd /etc/swift; swift-ring-builder object.builder rebalance; -########################## - - name: distribute ring configuration files to the other controller shell: > cd /etc/swift; - scp account.ring.gz container.ring.gz object.ring.gz root@{{ ip_settings[item.1]['mgmt']['ip'] }}:/etc/swift/; + scp account.ring.gz container.ring.gz object.ring.gz \ + root@{{ ip_settings[item.1]['mgmt']['ip'] }}:/etc/swift/; with_indexed_items: groups['controller'] - name: distribute ring configuration files to the all compute shell: > cd /etc/swift; - scp account.ring.gz container.ring.gz object.ring.gz root@{{ ip_settings[item.1]['mgmt']['ip'] }}:/etc/swift/; + scp account.ring.gz container.ring.gz object.ring.gz \ + root@{{ ip_settings[item.1]['mgmt']['ip'] }}:/etc/swift/; with_indexed_items: groups['compute'] -- cgit 1.2.3-korg