-
Michal Nasiadka authored
CentOS Storage SIG rpms have a recommended install section that installs podman - let's stop doing that. Ceph is also suffering from the enormous open files ulimit that EL9 defaults to - let's set a default in docker engine for now. Change-Id: I41f39f520dfecec307ad3b86e1e0363570198e42
Michal Nasiadka authoredCentOS Storage SIG rpms have a recommended install section that installs podman - let's stop doing that. Ceph is also suffering from the enormous open files ulimit that EL9 defaults to - let's set a default in docker engine for now. Change-Id: I41f39f520dfecec307ad3b86e1e0363570198e42
main.yml 2.12 KiB
---
- include_tasks: pkg_{{ ansible_os_family | lower }}.yml
- name: Ensure /etc/ceph exists
file:
path: /etc/ceph
state: directory
become: True
- name: Generate ssh key for cephadm
openssh_keypair:
path: "/etc/ceph/cephadm.id"
size: 4096
comment: "cephadm"
become: True
register: cephadm_ssh_key
- name: Save public key
copy:
content: "{{ cephadm_ssh_key.public_key }}"
dest: /etc/ceph/cephadm.pub
become: True
- name: Copy cephadm public key to all hosts
authorized_key:
user: root
state: present
key: "{{ cephadm_ssh_key.public_key }}"
become: True
with_inventory_hostnames:
- all
delegate_to: "{{ item }}"
- name: Bootstrap cephadm
vars:
mon_ip: "{{ hostvars[inventory_hostname]['ansible_'+api_interface_name].ipv4.address }}"
command:
cmd: >
cephadm
--docker
bootstrap
--ssh-private-key=/etc/ceph/cephadm.id
--ssh-public-key=/etc/ceph/cephadm.pub
--skip-monitoring-stack
--skip-dashboard
--skip-firewalld
--mon-ip {{ mon_ip }}
become: True
register: cephadm_bootstrap_output
- name: Get ceph fsid
vars:
regexp: 'Cluster fsid: (.*)'
set_fact:
ceph_fsid: "{{ cephadm_bootstrap_output.stdout | regex_search(regexp,'\\1') | first }}"
- name: Template out cluster spec
template:
src: templates/cephadm.yml.j2
dest: "/var/run/ceph/{{ ceph_fsid }}/cluster.yml"
become: True
- name: Template out command spec
template:
src: templates/commands.sh.j2
dest: "/var/run/ceph/{{ ceph_fsid }}/commands.sh"
become: True
- name: Run commands
command: