Place "when: restapi" in site.yml

pull/248/head
Alistair A. Israel 2015-04-14 17:40:58 +08:00
parent ea0e409b51
commit 40e6dd8e4f
2 changed files with 2 additions and 4 deletions

View File

@ -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

View File

@ -14,7 +14,7 @@
sudo: True
roles:
- ceph-mon
- ceph-restapi
- { role: ceph-restapi, when: restapi }
- hosts: osds
sudo: True