2015-03-23 22:08:58 +08:00
|
|
|
---
|
2015-07-24 02:01:43 +08:00
|
|
|
- name: create ceph rest api directory
|
2015-03-23 22:08:58 +08:00
|
|
|
file: >
|
|
|
|
path=/var/lib/ceph/restapi/ceph-restapi
|
|
|
|
state=directory
|
|
|
|
owner=root
|
|
|
|
group=root
|
2015-06-09 00:04:38 +08:00
|
|
|
mode=0755
|
2015-03-23 22:08:58 +08:00
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- name: copy ceph rest api keyring
|
2015-03-23 22:08:58 +08:00
|
|
|
copy: >
|
2015-08-27 18:42:01 +08:00
|
|
|
src={{ fetch_directory }}/{{ fsid }}/etc/ceph/ceph.client.restapi.keyring
|
2015-03-23 22:08:58 +08:00
|
|
|
dest=/var/lib/ceph/restapi/ceph-restapi/keyring
|
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=600
|
|
|
|
when: cephx
|
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- name: activate ceph rest api with upstart
|
2015-03-23 22:08:58 +08:00
|
|
|
file: >
|
2015-03-30 16:59:08 +08:00
|
|
|
path=/var/lib/ceph/restapi/{{ item }}
|
2015-03-23 22:08:58 +08:00
|
|
|
state=touch
|
|
|
|
owner=root
|
|
|
|
group=root
|
2015-03-30 16:59:08 +08:00
|
|
|
mode=0600
|
|
|
|
with_items:
|
|
|
|
- done
|
|
|
|
- upstart
|
2015-06-26 06:26:03 +08:00
|
|
|
changed_when: false
|
2015-03-30 16:59:08 +08:00
|
|
|
when: ansible_distribution == "Ubuntu"
|
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- name: activate ceph rest api with sysvinit
|
2015-03-30 16:59:08 +08:00
|
|
|
file: >
|
|
|
|
path=/var/lib/ceph/restapi/{{ item }}
|
|
|
|
state=touch
|
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=0600
|
|
|
|
with_items:
|
|
|
|
- done
|
|
|
|
- sysvinit
|
|
|
|
when: ansible_distribution != "Ubuntu"
|
|
|
|
|
|
|
|
# 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"
|