From 40e6dd8e4f5222ad9b2164e35bc69340c8908301 Mon Sep 17 00:00:00 2001 From: "Alistair A. Israel" Date: Tue, 14 Apr 2015 17:40:58 +0800 Subject: [PATCH] Place "when: restapi" in site.yml --- roles/ceph-restapi/tasks/main.yml | 4 +--- site.yml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) 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