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

60 lines
1.4 KiB
YAML
Raw Normal View History

---
- name: install debian dependencies
2015-10-19 09:24:47 +08:00
apt:
pkg: parted
state: present
when: ansible_os_family == 'Debian'
- name: enable extras repo on centos
yum_repository:
name: extras
state: present
enabled: yes
when: ansible_distribution == 'CentOS'
- name: install redhat dependencies via yum
2015-10-19 09:24:47 +08:00
yum:
name: parted
state: present
when:
- ansible_os_family == 'RedHat'
- ansible_pkg_mgr == "yum"
- name: install redhat rependencies via dnf
dnf:
name: parted
state: present
when:
- ansible_os_family == 'RedHat'
- ansible_pkg_mgr == "dnf"
- 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 ceph admin key when using dmcrypt
set_fact:
copy_admin_key: true
when:
- dmcrypt_journal_collocation or dmcrypt_dedicated_journal
- name: copy osd bootstrap key
2015-10-19 09:24:47 +08:00
copy:
src: "{{ fetch_directory }}/{{ fsid }}{{ item.name }}"
dest: "{{ item.name }}"
owner: "{{ key_owner }}"
group: "{{ key_group }}"
mode: "{{ key_mode }}"
with_items:
- { name: "/var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring", copy_key: true }
- { name: "/etc/ceph/{{ cluster }}.client.admin.keyring", copy_key: "{{ copy_admin_key }}" }
when:
- cephx
- item.copy_key|bool