2023-11-20 12:03:19 +00:00
|
|
|
- name: Configure /etc/hosts
|
|
|
|
template:
|
|
|
|
dest: /etc/hosts
|
|
|
|
src: hosts.j2
|
|
|
|
|
|
|
|
- name: Generate my SSH key
|
|
|
|
openssh_keypair:
|
|
|
|
path: /root/.ssh/id_ed25519
|
|
|
|
type: ed25519
|
2024-03-01 07:43:15 +00:00
|
|
|
comment: "root@{{ inventory_hostname }}"
|
2023-11-20 12:03:19 +00:00
|
|
|
register: my_key
|
|
|
|
|
|
|
|
- name: Deploy my key on other nodes
|
|
|
|
authorized_key:
|
|
|
|
user: root
|
|
|
|
key: "{{ my_key.public_key }}"
|
|
|
|
comment: "{{ my_key.comment }}"
|
|
|
|
delegate_to: "{{ item }}"
|
2024-03-01 07:43:15 +00:00
|
|
|
loop: "{{ nodes | map(attribute='inventory_hostname') }}"
|
2023-11-20 12:03:19 +00:00
|
|
|
|
|
|
|
- name: Install required packages
|
|
|
|
package:
|
|
|
|
name:
|
|
|
|
- lvm2
|
|
|
|
- podman
|
|
|
|
|
|
|
|
- name: Install cephadm script
|
|
|
|
get_url:
|
|
|
|
url: https://download.ceph.com/rpm-{{ ceph_version }}/el9/noarch/cephadm
|
2024-04-27 08:44:58 +00:00
|
|
|
checksum: '{{ cephadm_checksum }}'
|
2023-11-20 12:03:19 +00:00
|
|
|
dest: /usr/local/bin/cephadm
|
|
|
|
mode: 0755
|
|
|
|
|
|
|
|
- include_tasks: firewall.yml
|