60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
---
|
|
- name: deploy all the needed tools for ceph
|
|
hosts: all
|
|
become: true
|
|
gather_facts: true
|
|
diff: true
|
|
vars:
|
|
ceph_repo: "https://download.ceph.com/debian-squid"
|
|
ntp_server: "ntp.int.nt-com.ru"
|
|
first_mon_ip: "10.63.1.19"
|
|
cluster_network: "10.63.0.0/24"
|
|
public_network: "10.63.1.0/24"
|
|
CEPH_RELEASE: '19.2.0'
|
|
tasks:
|
|
- name: download asc from ceph
|
|
get_url:
|
|
url: https://download.ceph.com/keys/release.asc
|
|
dest: /tmp
|
|
|
|
- name: get gpg key and import it
|
|
shell:
|
|
chdir: /tmp
|
|
cmd: echo y | gpg -o /usr/share/keyrings/ceph.gpg --dearmor release.asc;
|
|
|
|
- name: Add ceph repo
|
|
apt_repository:
|
|
filename: ceph
|
|
repo: "deb [signed-by=/usr/share/keyrings/ceph.gpg] {{ ceph_repo }} {{ ansible_distribution_release }} main"
|
|
state: present
|
|
|
|
block: # here bootstrap the cluster
|
|
- name: download cepadm bootstrapper
|
|
get_url:
|
|
url: https://download.ceph.com/rpm-${CEPH_RELEASE}/el9/noarch/cephadm
|
|
dest: /tmp
|
|
mode: '777'
|
|
|
|
|
|
# - name: install packages
|
|
# apt:
|
|
# pkg:
|
|
# - cephadm
|
|
# - lvm2
|
|
# - podman
|
|
# - chrony
|
|
# state: present
|
|
#
|
|
# - name: Setup ntp client
|
|
# template:
|
|
# src: chrony.yaml.j2
|
|
# dest: /etc/chrony/chrony.conf
|
|
# notify:
|
|
# - ceph-rollout:restart
|
|
#
|
|
# handlers:
|
|
# - name: ceph-rollout:restart
|
|
# ansible.builtin.systemd_service:
|
|
# state: restarted
|
|
# name: chronyd
|
|
# listen: "restart chronyd service" |