diff options
author | chenshuai@huawei.com <chenshuai@huawei.com> | 2016-08-03 21:51:05 -0400 |
---|---|---|
committer | chenshuai@huawei.com <chenshuai@huawei.com> | 2016-08-04 04:07:25 -0400 |
commit | 961def4bf947094bc017d05de426fd1900bf7c83 (patch) | |
tree | 692779fc9e5864d2606554c1e8d567cbe3f44fcc /deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift | |
parent | 0d57b886e0db03377d9ae60af0372310b835b749 (diff) |
add moon switch in Compass4nfv
JIRA: COMPASS-461
Change-Id: Ic8343249f3ca31aa6c0d3090428dad4936a7f60c
Signed-off-by: chenshuai@huawei.com <chenshuai@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift')
-rw-r--r-- | deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml | 50 |
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 |