Debian Codegraph @

ansible_collections/dellemc/openmanage/roles/idrac_gather_facts/tasks/get_physical_info.yml

raw symbols SCIP
1 ---
2 - name: Get Storage information.
3 ansible.builtin.uri:
4 url: "https://{{ hostname }}:{{ https_port }}{{ api_system }}/Storage"
5 register: disk_result
6 delegate_to: "{{ idrac_gather_facts_delegate }}"
7
8 - name: Get all storage controller ids.
9 ansible.builtin.set_fact:
10 storage_ids_list: "{{ disk_result.json.Members | map('dict2items') | flatten | map(attribute='value') }}"
11
12 - name: Get PhysicalDisk information.
13 ansible.builtin.uri:
14 url: "https://{{ hostname }}:{{ https_port }}{{ item }}?$expand=*($levels=1)"
15 loop: "{{ storage_ids_list }}"
16 register: result
17 delegate_to: "{{ idrac_gather_facts_delegate }}"
18
19 - name: Set Physical Disk facts
20 ansible.builtin.set_fact:
21 physical_disk:
22 "{{ result.results | selectattr('json', 'defined') | map(attribute='json') | selectattr('Drives', 'defined') |
23 map(attribute='Drives') | flatten | ansible.utils.remove_keys(target=[
24 '@odata.context', '@odata.id', '@odata.etag', '@odata.type', 'Actions',
25 'Assembly', 'Links', 'DellDriveSMARTAttributes',
26 'DellNVMeSMARTAttributes', '[email protected]']) }}"
27
28 - name: Error capture
29 ansible.builtin.include_tasks:
30 file: ./__capture_error.yml
31 vars:
32 register_vars:
33 - "{{ disk_result }}"
34 - "{{ result }}"
35 component: 'physical_disk'