From: Alistair A. Israel Date: Tue, 14 Apr 2015 09:40:58 +0000 (+0800) Subject: Place "when: restapi" in site.yml X-Git-Tag: v1.0.0~227^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=40e6dd8e4f5222ad9b2164e35bc69340c8908301;p=ceph-ansible.git Place "when: restapi" in site.yml --- diff --git a/roles/ceph-restapi/tasks/main.yml b/roles/ceph-restapi/tasks/main.yml index 01820fa7f..5bf69816f 100644 --- a/roles/ceph-restapi/tasks/main.yml +++ b/roles/ceph-restapi/tasks/main.yml @@ -1,14 +1,12 @@ --- - include: pre_requisite.yml - when: restapi - name: Check if Ceph REST API is already started shell: "ps aux|grep [c]eph-rest-api" register: restapi_status - when: restapi ignore_errors: True - name: Start Ceph REST API shell: "nohup ceph-rest-api &" - when: restapi and restapi_status.rc != 0 + when: restapi_status.rc != 0 changed_when: False diff --git a/site.yml b/site.yml index e7d10b0d7..72704be59 100644 --- a/site.yml +++ b/site.yml @@ -14,7 +14,7 @@ sudo: True roles: - ceph-mon - - ceph-restapi + - { role: ceph-restapi, when: restapi } - hosts: osds sudo: True