-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathceph.yml
executable file
·47 lines (40 loc) · 1.16 KB
/
ceph.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env ansible-playbook
---
- name: setup_ceph
hosts: ceph_hosts
vars:
repositories_for_rhel_version:
"7":
- rhel-7-server-rhceph-4-tools-rpms
- rhel-7-server-ansible-2.8-rpms
"8":
- rhceph-4-tools-for-rhel-8-x86_64-rpms
- ansible-2.8-for-rhel-8-x86_64-rpms
- import_playbook: registry_token.yml
when: inventory_hostname in groups['ceph_consoles']
tasks:
- name: repositories
rhsm_repository:
name: "{{ repositories_for_rhel_version[ansible_distribution_major_version] }}"
state: enabled
- name: ceph-ansible_package
yum:
name:
- ceph-ansible
- cockpit-ceph-installer
state: latest
when: inventory_hostname in groups['ceph_consoles']
- name: ansible_runner
command: ansible-runner-service.sh -s
when: inventory_hostname in groups['ceph_consoles']
- name: retrieve_ssh_key
fetch:
src: /usr/share/ansible-runner-service/env/ssh_key.pub
dest: /tmp/
flat: true
when: inventory_hostname in groups['ceph_consoles']
- name: deliver_ssh_key
authorized_key:
user: root
key: "{{ lookup('file', '/tmp/ssh_key.pub') }}"
...