servers/roles/ceph/tasks/main.yml

42 lines
970 B
YAML
Raw Normal View History

- name: Configure /etc/hosts
template:
dest: /etc/hosts
src: hosts.j2
2024-06-19 13:07:59 +00:00
- name: Set up NTP servers
lineinfile:
path: /etc/systemd/timesyncd.conf
regexp: '^#?NTP='
line: 'NTP={{ ntp | join(" ") }}'
notify: restart systemd-timesyncd
- name: Generate my SSH key
openssh_keypair:
path: /root/.ssh/id_ed25519
type: ed25519
comment: "root@{{ inventory_hostname }}"
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 }}"
loop: "{{ nodes | map(attribute='inventory_hostname') }}"
- 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 }}'
dest: /usr/local/bin/cephadm
mode: 0755
- include_tasks: firewall.yml