From 1d792fcdb1e4ef3ab2c97d4d2a4b4ebeeec45258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 8 Jan 2016 14:52:50 +0100 Subject: [PATCH] Fix condition logic for infernalis in restapi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes: #465 Signed-off-by: Sébastien Han --- roles/ceph-restapi/tasks/pre_requisite.yml | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/roles/ceph-restapi/tasks/pre_requisite.yml b/roles/ceph-restapi/tasks/pre_requisite.yml index 4da21012b..8f6cfa887 100644 --- a/roles/ceph-restapi/tasks/pre_requisite.yml +++ b/roles/ceph-restapi/tasks/pre_requisite.yml @@ -6,7 +6,7 @@ owner: ceph group: ceph mode: 0755 - when: ceph_stable_release not in ceph_stable_releases + when: is_ceph_infernalis - name: create ceph rest api directory (before infernalis release) file: @@ -15,7 +15,7 @@ owner: root group: root mode: 0755 - when: ceph_stable_release in ceph_stable_releases + when: not is_ceph_infernalis - name: copy ceph rest api keyring (for or after infernalis release) copy: @@ -23,9 +23,10 @@ dest: "/var/lib/ceph/restapi/ceph-restapi/keyring" owner: ceph group: ceph - mode: 600 + mode: 0600 when: - cephx and ceph_stable_release not in ceph_stable_releases + cephx and + is_ceph_infernalis - name: copy ceph rest api keyring (before infernalis release) copy: @@ -35,7 +36,8 @@ group: root mode: 600 when: - cephx and ceph_stable_release in ceph_stable_releases + cephx and + not is_ceph_infernalis - name: activate ceph rest api with upstart (for or after infernalis release) file: @@ -49,7 +51,8 @@ - upstart changed_when: false when: - ansible_distribution == "Ubuntu" and ceph_stable_release not in ceph_stable_releases + ansible_distribution == "Ubuntu" and + is_ceph_infernalis - name: activate ceph rest api with upstart (before infernalis release) file: @@ -63,7 +66,8 @@ - upstart changed_when: false when: - ansible_distribution == "Ubuntu" and ceph_stable_release not in ceph_stable_releases + ansible_distribution == "Ubuntu" and + not is_ceph_infernalis - name: activate ceph rest api with sysvinit (for or after infernalis release)) file: @@ -76,7 +80,8 @@ - done - sysvinit when: - ansible_distribution != "Ubuntu" and ceph_stable_release not in ceph_stable_releases + ansible_distribution != "Ubuntu" and + is_ceph_infernalis - name: activate ceph rest api with sysvinit (before infernalis release)) file: @@ -89,7 +94,8 @@ - done - sysvinit when: - ansible_distribution != "Ubuntu" and ceph_stable_release not in ceph_stable_releases + ansible_distribution != "Ubuntu" and + not is_ceph_infernalis # NOTE (leseb): will uncomment this when this https://github.com/ceph/ceph/pull/4144 lands #- name: start and add that the Ceph REST API service to the init sequence (Ubuntu)