--- - 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 file: path: /var/lib/ceph/bootstrap-osd/ state: directory owner: "{{ dir_owner }}" group: "{{ dir_group }}" mode: "{{ dir_mode }}" when: cephx - name: copy osd bootstrap key copy: src: "{{ fetch_directory }}/{{ fsid }}{{ item.name }}" dest: "{{ item }}" owner: "{{ key_owner }}" group: "{{ key_group }}" mode: "{{ key_mode }}" with_items: - { name: /var/lib/ceph/bootstrap-osd/ceph.keyring, copy: true } - { name: /etc/ceph/client.admin.keyring, "{{ copy_admin_key }}" } when: cephx and item.copy is true