2015-03-23 22:08:58 +08:00
|
|
|
---
|
2016-02-02 22:10:24 +08:00
|
|
|
- name: create ceph rest api directory
|
2015-11-17 23:10:02 +08:00
|
|
|
file:
|
|
|
|
path: /var/lib/ceph/restapi/ceph-restapi
|
|
|
|
state: directory
|
2016-02-02 22:10:24 +08:00
|
|
|
owner: "{{ dir_owner }}"
|
|
|
|
group: "{{ dir_group }}"
|
|
|
|
mode: "{{ dir_mode }}"
|
2015-11-17 23:10:02 +08:00
|
|
|
|
2016-02-02 22:10:24 +08:00
|
|
|
- name: copy ceph rest api keyring
|
2015-10-19 11:28:48 +08:00
|
|
|
copy:
|
2016-03-29 21:37:31 +08:00
|
|
|
src: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/{{ cluster }}.client.restapi.keyring"
|
2015-10-19 11:28:48 +08:00
|
|
|
dest: "/var/lib/ceph/restapi/ceph-restapi/keyring"
|
2016-02-02 22:10:24 +08:00
|
|
|
owner: "{{ key_owner }}"
|
|
|
|
group: "{{ key_group }}"
|
|
|
|
mode: "{{ key_mode }}"
|
|
|
|
when: cephx
|
2015-03-23 22:08:58 +08:00
|
|
|
|
2016-02-02 22:10:24 +08:00
|
|
|
- name: activate ceph rest api with upstart
|
2015-11-17 23:10:02 +08:00
|
|
|
file:
|
|
|
|
path: /var/lib/ceph/restapi/{{ item }}
|
|
|
|
state: touch
|
2016-02-02 22:10:24 +08:00
|
|
|
owner: "{{ activate_file_owner }}"
|
|
|
|
group: "{{ activate_file_group }}"
|
|
|
|
mode: "{{ activate_file_mode }}"
|
2015-11-17 23:10:02 +08:00
|
|
|
with_items:
|
|
|
|
- done
|
|
|
|
- upstart
|
|
|
|
changed_when: false
|
2016-02-02 22:10:24 +08:00
|
|
|
when: ansible_distribution == "Ubuntu"
|
2015-03-30 16:59:08 +08:00
|
|
|
|
2016-02-02 22:10:24 +08:00
|
|
|
- name: activate ceph rest api with sysvinit
|
2015-10-19 11:28:48 +08:00
|
|
|
file:
|
|
|
|
path: /var/lib/ceph/restapi/{{ item }}
|
|
|
|
state: touch
|
2016-02-02 22:10:24 +08:00
|
|
|
owner: "{{ activate_file_owner }}"
|
|
|
|
group: "{{ activate_file_group }}"
|
|
|
|
mode: "{{ activate_file_mode }}"
|
2015-03-30 16:59:08 +08:00
|
|
|
with_items:
|
|
|
|
- done
|
|
|
|
- sysvinit
|
2016-02-02 22:10:24 +08:00
|
|
|
when: ansible_distribution != "Ubuntu"
|
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"
|