ceph-ansible/roles/ceph-restapi/tasks/pre_requisite.yml

63 lines
1.5 KiB
YAML
Raw Normal View History

---
- name: create ceph rest api directory
file:
path: /var/lib/ceph/restapi/ceph-restapi
state: directory
owner: "ceph"
group: "ceph"
mode: "0755"
- name: copy ceph rest api keyring
2015-10-19 11:28:48 +08:00
copy:
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"
owner: "ceph"
group: "ceph"
mode: "0600"
when:
- cephx
- name: activate ceph rest api with upstart
file:
path: /var/lib/ceph/restapi/{{ item }}
state: touch
owner: "ceph"
group: "ceph"
mode: "0644"
with_items:
- done
- upstart
changed_when: false
when:
- ansible_distribution == 'Ubuntu'
- name: activate ceph rest api with sysvinit
2015-10-19 11:28:48 +08:00
file:
path: /var/lib/ceph/restapi/{{ item }}
state: touch
owner: "ceph"
group: "ceph"
mode: "0644"
with_items:
- done
- sysvinit
when:
- ansible_distribution != 'Ubuntu'
# 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)
# service: >
# name=ceph-restapi
# state=started
# enabled=yes
# args="id={{ ansible_hostname }}"
# when: ansible_distribution == "Ubuntu"
#
#- name: start and add that the Ceph REST API service to the init sequence
# service: >
# name=ceph
# state=started
# enabled=yes
# args=restapi
# when: ansible_distribution != "Ubuntu"