--- - name: create ceph rest api directory file: path: /var/lib/ceph/restapi/ceph-restapi state: directory owner: "{{ dir_owner }}" group: "{{ dir_group }}" mode: "{{ dir_mode }}" - name: copy ceph rest api keyring copy: src: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/ceph.client.restapi.keyring" dest: "/var/lib/ceph/restapi/ceph-restapi/keyring" owner: "{{ key_owner }}" group: "{{ key_group }}" mode: "{{ key_mode }}" when: cephx - name: activate ceph rest api with upstart file: path: /var/lib/ceph/restapi/{{ item }} state: touch owner: "{{ activate_file_owner }}" group: "{{ activate_file_group }}" mode: "{{ activate_file_mode }}" with_items: - done - upstart changed_when: false when: ansible_distribution == "Ubuntu" - name: activate ceph rest api with sysvinit file: path: /var/lib/ceph/restapi/{{ item }} state: touch owner: "{{ activate_file_owner }}" group: "{{ activate_file_group }}" mode: "{{ activate_file_mode }}" 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"