--- - name: install dependencies apt: pkg: parted state: present when: ansible_os_family == 'Debian' - name: install dependencies yum: name: parted state: present when: ansible_os_family == 'RedHat' - name: create bootstrap-osd directory (for or after infernalis release) file: path: /var/lib/ceph/bootstrap-osd/ state: directory owner: ceph group: ceph mode: 0755 when: cephx and is_ceph_infernalis - name: create bootstrap-osd directory (before infernalis release) file: path: /var/lib/ceph/bootstrap-osd/ state: directory owner: root group: root mode: 0755 when: cephx and not is_ceph_infernalis - name: copy osd bootstrap key (for or after infernalis release) copy: src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-osd/ceph.keyring" dest: /var/lib/ceph/bootstrap-osd/ceph.keyring owner: ceph group: ceph mode: 0600 when: cephx and is_ceph_infernalis - name: copy osd bootstrap key (before infernalis release) copy: src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-osd/ceph.keyring" dest: /var/lib/ceph/bootstrap-osd/ceph.keyring owner: root group: root mode: 600 when: cephx and not is_ceph_infernalis