-
Notifications
You must be signed in to change notification settings - Fork 0
/
facts.yml
39 lines (34 loc) · 970 Bytes
/
facts.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
- hosts: satellite
gather_facts: no
vars:
storage_pools:
- name: satellite
disks:
- sdb
volumes:
- name: pgsql
size: 20G
mount_point: /var/lib/pgsql
state: present
- name: pulp
size: 300G
mount_point: /var/lib/pulp
state: present
- name: qpidd
size: 5G
mount_point: /var/lib/qpidd
state: present
tasks:
- ansible.builtin.setup:
filter: ansible_lvm
register: lvm
- ansible.builtin.set_fact:
logical_volumes: "{{ lvm.ansible_facts.ansible_lvm.lvs }}"
- ansible.builtin.debug:
var: logical_volumes
when: '"pgsqll" in logical_volumes'
- ansible.builtin.debug:
msg:
- "{{ storage_pools[0].volumes[0].name }}"
- "{{ storage_pools[0].volumes[1].name }}"
- "{{ storage_pools[0].volumes[2].name }}"