aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift
diff options
context:
space:
mode:
authorchenshuai@huawei.com <chenshuai@huawei.com>2016-08-04 10:39:56 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-04 10:39:56 +0000
commitc18985b42afe1468c245e3c1967d13e3b55d9b3c (patch)
tree91f132ae2d2dfea57926fedbcfa5e047fef13726 /deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift
parent01273e04385dd07910e2f6473672ea1911a55b25 (diff)
parent961def4bf947094bc017d05de426fd1900bf7c83 (diff)
Merge "add moon switch in Compass4nfv"
Diffstat (limited to 'deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift')
-rw-r--r--deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml50
1 files changed, 7 insertions, 43 deletions
diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml
index 25c151a3..4e2651a7 100644
--- a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml
+++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml
@@ -51,8 +51,8 @@
- name: wait 30 seconds
shell: sleep 30
-- name: stop tasks on compute
- service: name={{ item }} state=stop enabled=yes
+- name: create swift task script
+ shell: echo {{ item }} >> /opt/swift-service
with_items:
- swift-account
- swift-account-replicator
@@ -70,46 +70,10 @@
when: inventory_hostname in groups['compute']
ignore_errors: True
-- name: sleep 10 second
- shell: sleep 10
-
-- name: start tasks on compute
- service: name={{ item }} state=start enabled=yes
- with_items:
- - swift-account
- - swift-account-replicator
- - swift-container-replicator
- - swift-object
- - swift-object-updater
- - swift-account-auditor
- - swift-container
- - swift-container-sync
- - swift-object-auditor
- - swift-account-reaper
- - swift-container-auditor
- - swift-container-updater
- - swift-object-replicator
- when: inventory_hostname in groups['compute']
- ignore_errors: True
-
-- name: sleep 10 second
- shell: sleep 10
-
-- name: start tasks on compute
- service: name={{ item }} state=start enabled=yes
- with_items:
- - swift-account
- - swift-account-replicator
- - swift-container-replicator
- - swift-object
- - swift-object-updater
- - swift-account-auditor
- - swift-container
- - swift-container-sync
- - swift-object-auditor
- - swift-account-reaper
- - swift-container-auditor
- - swift-container-updater
- - swift-object-replicator
+- name: restart swift task
+ shell: >
+ for i in `cat /opt/swift-service`; do service $i start; done;
+ sleep 10;
+ for i in `cat /opt/swift-service`; do service $i restart; done;
when: inventory_hostname in groups['compute']
ignore_errors: True