2015-03-23 22:08:58 +08:00
|
|
|
---
|
2015-11-17 23:10:02 +08:00
|
|
|
- name: create ceph rest api directory (for or after infernalis release)
|
|
|
|
file:
|
|
|
|
path: /var/lib/ceph/restapi/ceph-restapi
|
|
|
|
state: directory
|
|
|
|
owner: ceph
|
|
|
|
group: ceph
|
|
|
|
mode: 0755
|
|
|
|
when:
|
2015-12-05 06:36:24 +08:00
|
|
|
ceph_stable_release != 'dumpling' and
|
|
|
|
ceph_stable_release != 'emperor' and
|
|
|
|
ceph_stable_release != 'firefly' and
|
|
|
|
ceph_stable_release != 'giant' and
|
2015-11-17 23:10:02 +08:00
|
|
|
ceph_stable_release != 'hammer'
|
|
|
|
|
|
|
|
- name: create ceph rest api directory (before infernalis release)
|
2015-10-19 11:28:48 +08:00
|
|
|
file:
|
|
|
|
path: /var/lib/ceph/restapi/ceph-restapi
|
|
|
|
state: directory
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0755
|
2015-11-17 23:10:02 +08:00
|
|
|
when:
|
|
|
|
ceph_stable_release == 'dumpling' or
|
|
|
|
ceph_stable_release == 'emperor' or
|
|
|
|
ceph_stable_release == 'firefly' or
|
|
|
|
ceph_stable_release == 'giant' or
|
|
|
|
ceph_stable_release == 'hammer'
|
|
|
|
|
|
|
|
- name: copy ceph rest api keyring (for or after infernalis release)
|
|
|
|
copy:
|
|
|
|
src: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/ceph.client.restapi.keyring"
|
|
|
|
dest: "/var/lib/ceph/restapi/ceph-restapi/keyring"
|
|
|
|
owner: ceph
|
|
|
|
group: ceph
|
|
|
|
mode: 600
|
|
|
|
when:
|
|
|
|
cephx and
|
2015-12-05 06:36:24 +08:00
|
|
|
(ceph_stable_release != 'dumpling' and
|
|
|
|
ceph_stable_release != 'emperor' and
|
|
|
|
ceph_stable_release != 'firefly' and
|
|
|
|
ceph_stable_release != 'giant' and
|
2015-11-17 23:10:02 +08:00
|
|
|
ceph_stable_release != 'hammer')
|
2015-03-23 22:08:58 +08:00
|
|
|
|
2015-11-17 23:10:02 +08:00
|
|
|
- name: copy ceph rest api keyring (before infernalis release)
|
2015-10-19 11:28:48 +08:00
|
|
|
copy:
|
|
|
|
src: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/ceph.client.restapi.keyring"
|
|
|
|
dest: "/var/lib/ceph/restapi/ceph-restapi/keyring"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 600
|
2015-11-17 23:10:02 +08:00
|
|
|
when:
|
|
|
|
cephx and
|
|
|
|
(ceph_stable_release == 'dumpling' or
|
|
|
|
ceph_stable_release == 'emperor' or
|
|
|
|
ceph_stable_release == 'firefly' or
|
|
|
|
ceph_stable_release == 'giant' or
|
|
|
|
ceph_stable_release == 'hammer')
|
2015-03-23 22:08:58 +08:00
|
|
|
|
2015-11-17 23:10:02 +08:00
|
|
|
- name: activate ceph rest api with upstart (for or after infernalis release)
|
|
|
|
file:
|
|
|
|
path: /var/lib/ceph/restapi/{{ item }}
|
|
|
|
state: touch
|
|
|
|
owner: ceph
|
|
|
|
group: ceph
|
|
|
|
mode: 0600
|
|
|
|
with_items:
|
|
|
|
- done
|
|
|
|
- upstart
|
|
|
|
changed_when: false
|
|
|
|
when:
|
|
|
|
ansible_distribution == "Ubuntu" and
|
2015-12-05 06:36:24 +08:00
|
|
|
(ceph_stable_release != 'dumpling' and
|
|
|
|
ceph_stable_release != 'emperor' and
|
|
|
|
ceph_stable_release != 'firefly' and
|
|
|
|
ceph_stable_release != 'giant' and
|
2015-11-17 23:10:02 +08:00
|
|
|
ceph_stable_release != 'hammer')
|
|
|
|
|
|
|
|
- name: activate ceph rest api with upstart (before infernalis release)
|
2015-10-19 11:28:48 +08:00
|
|
|
file:
|
|
|
|
path: /var/lib/ceph/restapi/{{ item }}
|
|
|
|
state: touch
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0600
|
2015-03-30 16:59:08 +08:00
|
|
|
with_items:
|
|
|
|
- done
|
|
|
|
- upstart
|
2015-06-26 06:26:03 +08:00
|
|
|
changed_when: false
|
2015-11-17 23:10:02 +08:00
|
|
|
when:
|
|
|
|
ansible_distribution == "Ubuntu" and
|
|
|
|
(ceph_stable_release != 'dumpling' or
|
|
|
|
ceph_stable_release != 'emperor' or
|
|
|
|
ceph_stable_release != 'firefly' or
|
|
|
|
ceph_stable_release != 'giant' or
|
|
|
|
ceph_stable_release != 'hammer')
|
|
|
|
|
|
|
|
- name: activate ceph rest api with sysvinit (for or after infernalis release))
|
|
|
|
file:
|
|
|
|
path: /var/lib/ceph/restapi/{{ item }}
|
|
|
|
state: touch
|
|
|
|
owner: ceph
|
|
|
|
group: ceph
|
|
|
|
mode: 0600
|
|
|
|
with_items:
|
|
|
|
- done
|
|
|
|
- sysvinit
|
|
|
|
when:
|
|
|
|
ansible_distribution != "Ubuntu" and
|
2015-12-05 06:36:24 +08:00
|
|
|
(ceph_stable_release != 'dumpling' and
|
|
|
|
ceph_stable_release != 'emperor' and
|
|
|
|
ceph_stable_release != 'firefly' and
|
|
|
|
ceph_stable_release != 'giant' and
|
2015-11-17 23:10:02 +08:00
|
|
|
ceph_stable_release != 'hammer')
|
2015-03-30 16:59:08 +08:00
|
|
|
|
2015-11-17 23:10:02 +08:00
|
|
|
- name: activate ceph rest api with sysvinit (before infernalis release))
|
2015-10-19 11:28:48 +08:00
|
|
|
file:
|
|
|
|
path: /var/lib/ceph/restapi/{{ item }}
|
|
|
|
state: touch
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0600
|
2015-03-30 16:59:08 +08:00
|
|
|
with_items:
|
|
|
|
- done
|
|
|
|
- sysvinit
|
2015-11-17 23:10:02 +08:00
|
|
|
when:
|
|
|
|
ansible_distribution != "Ubuntu" and
|
|
|
|
(ceph_stable_release != 'dumpling' or
|
|
|
|
ceph_stable_release != 'emperor' or
|
|
|
|
ceph_stable_release != 'firefly' or
|
|
|
|
ceph_stable_release != 'giant' or
|
|
|
|
ceph_stable_release != 'hammer')
|
2015-03-30 16:59:08 +08:00
|
|
|
|
|
|
|
# NOTE (leseb): will uncomment this when this https://github.com/ceph/ceph/pull/4144 lands
|
2015-05-16 00:27:41 +08:00
|
|
|
#- name: start and add that the Ceph REST API service to the init sequence (Ubuntu)
|
2015-03-30 16:59:08 +08:00
|
|
|
# service: >
|
|
|
|
# name=ceph-restapi
|
|
|
|
# state=started
|
|
|
|
# enabled=yes
|
|
|
|
# args="id={{ ansible_hostname }}"
|
|
|
|
# when: ansible_distribution == "Ubuntu"
|
|
|
|
#
|
2015-05-16 00:27:41 +08:00
|
|
|
#- name: start and add that the Ceph REST API service to the init sequence
|
2015-03-30 16:59:08 +08:00
|
|
|
# service: >
|
|
|
|
# name=ceph
|
|
|
|
# state=started
|
|
|
|
# enabled=yes
|
|
|
|
# args=restapi
|
|
|
|
# when: ansible_distribution != "Ubuntu"
|