Fix condition logic for infernalis in restapi

fixes: #465

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/467/head
Sébastien Han 2016-01-08 14:52:50 +01:00
parent 1664316d4d
commit 1d792fcdb1
1 changed files with 15 additions and 9 deletions

View File

@ -6,7 +6,7 @@
owner: ceph owner: ceph
group: ceph group: ceph
mode: 0755 mode: 0755
when: ceph_stable_release not in ceph_stable_releases when: is_ceph_infernalis
- name: create ceph rest api directory (before infernalis release) - name: create ceph rest api directory (before infernalis release)
file: file:
@ -15,7 +15,7 @@
owner: root owner: root
group: root group: root
mode: 0755 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) - name: copy ceph rest api keyring (for or after infernalis release)
copy: copy:
@ -23,9 +23,10 @@
dest: "/var/lib/ceph/restapi/ceph-restapi/keyring" dest: "/var/lib/ceph/restapi/ceph-restapi/keyring"
owner: ceph owner: ceph
group: ceph group: ceph
mode: 600 mode: 0600
when: 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) - name: copy ceph rest api keyring (before infernalis release)
copy: copy:
@ -35,7 +36,8 @@
group: root group: root
mode: 600 mode: 600
when: 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) - name: activate ceph rest api with upstart (for or after infernalis release)
file: file:
@ -49,7 +51,8 @@
- upstart - upstart
changed_when: false changed_when: false
when: 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) - name: activate ceph rest api with upstart (before infernalis release)
file: file:
@ -63,7 +66,8 @@
- upstart - upstart
changed_when: false changed_when: false
when: 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)) - name: activate ceph rest api with sysvinit (for or after infernalis release))
file: file:
@ -76,7 +80,8 @@
- done - done
- sysvinit - sysvinit
when: 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)) - name: activate ceph rest api with sysvinit (before infernalis release))
file: file:
@ -89,7 +94,8 @@
- done - done
- sysvinit - sysvinit
when: 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 # 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) #- name: start and add that the Ceph REST API service to the init sequence (Ubuntu)