--- - 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: ceph_stable_release != 'dumpling' and ceph_stable_release != 'emperor' and ceph_stable_release != 'firefly' and ceph_stable_release != 'giant' and ceph_stable_release != 'hammer' - name: create ceph rest api directory (before infernalis release) file: path: /var/lib/ceph/restapi/ceph-restapi state: directory owner: root group: root mode: 0755 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 (ceph_stable_release != 'dumpling' and ceph_stable_release != 'emperor' and ceph_stable_release != 'firefly' and ceph_stable_release != 'giant' and ceph_stable_release != 'hammer') - name: copy ceph rest api keyring (before infernalis release) 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 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') - 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 (ceph_stable_release != 'dumpling' and ceph_stable_release != 'emperor' and ceph_stable_release != 'firefly' and ceph_stable_release != 'giant' and ceph_stable_release != 'hammer') - name: activate ceph rest api with upstart (before infernalis release) file: path: /var/lib/ceph/restapi/{{ item }} state: touch owner: root group: root mode: 0600 with_items: - done - upstart changed_when: false 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 (ceph_stable_release != 'dumpling' and ceph_stable_release != 'emperor' and ceph_stable_release != 'firefly' and ceph_stable_release != 'giant' and ceph_stable_release != 'hammer') - name: activate ceph rest api with sysvinit (before infernalis release)) file: path: /var/lib/ceph/restapi/{{ item }} state: touch owner: root group: root mode: 0600 with_items: - done - sysvinit 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') # 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"