-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathrbd.yml
More file actions
32 lines (25 loc) · 760 Bytes
/
rbd.yml
File metadata and controls
32 lines (25 loc) · 760 Bytes
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
---
- name: Install additional packages for rbd support
package:
name: "{{ libvirt_host_packages_rbd_volume_pool | flatten(levels=1) }}"
state: present
notify: restart libvirt
- name: Create temporary file for Ceph secret
tempfile:
state: file
suffix: .xml
register: secret_tempfile
- name: Send Ceph secret
template:
src: ceph_secret.xml.j2
dest: "{{ secret_tempfile.path }}"
- name: Define Ceph secret
command: "virsh secret-define {{ secret_tempfile.path }}"
- name: Set Ceph secret value
command: "virsh secret-set-value {{ item.name | to_uuid }} {{ item.passphrase }}"
- name: Delete temporary file
file:
path: "{{ secret_tempfile.path }}"
state: absent
- name: Flush handlers
meta: flush_handlers