summaryrefslogtreecommitdiffstats
path: root/ansible_collections/dellemc/powerflex/playbooks/modules/info.yml
blob: fac8af87e09871b53cdbbec97e9b8aa673428dc9 (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
---
- name: Gatherfacts Module Operations on PowerFlex
  hosts: localhost
  connection: local
  vars:
    hostname: 'x.x.x.x'
    username: 'admin'
    password: 'Password'
    validate_certs: false
    host_port: 443
  tasks:
    - name: Get detailed list of PowerFlex Entities
      dellemc.powerflex.info:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        gather_subset:
          - vol
          - storage_pool
          - protection_domain
          - sdc
          - sds
          - snapshot_policy
          - device
          - rcg
          - replication_pair
          - fault_set

    - name: Get specific volume details
      dellemc.powerflex.info:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        gather_subset:
          - vol
        filters:
          - filter_key: "name"
            filter_operator: "equal"
            filter_value: "ansible_test"

    - name: Get specific fault set list
      dellemc.powerflex.info:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        gather_subset:
          - fault_set
        filters:
          - filter_key: "name"
            filter_operator: "equal"
            filter_value: "node4"

    - name: Get managed device, deployments, service templates
      dellemc.powerflex.info:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        gather_subset:
          - managed_device
          - deployment
          - service_template

    - name: Get deployment with filter, sort, pagination
      dellemc.powerflex.info:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        gather_subset:
          - deployment
        filters:
          - filter_key: "name"
            filter_operator: "contains"
            filter_value: "partial"
        sort: name
        limit: 10

    - name: Get the list of firmware repository
      dellemc.powerflex.info:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        gather_subset:
          - firmware_repository

    - name: Get the list of firmware repository
      dellemc.powerflex.info:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        gather_subset:
          - firmware_repository
        include_related: true
        include_bundles: true
        include_components: true

    - name: Get the list of firmware repository with filter
      dellemc.powerflex.info:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        gather_subset:
          - firmware_repository
        filters:
          - filter_key: "createdBy"
            filter_operator: "equal"
            filter_value: "admin"
        sort: createdDate
        limit: 10
        include_related: true
        include_bundles: true
        include_components: true
      register: result_repository_out

    - name: Get the list of available firmware repository
      ansible.builtin.debug:
        msg: "{{ result_repository_out.FirmwareRepository |
          selectattr('state', 'equalto', 'available') }}"

    - name: Get the list of software components in the firmware repository
      ansible.builtin.debug:
        msg: "{{ result_repository_out.FirmwareRepository |
          selectattr('id', 'equalto', '8aaa80788b7') |
          map(attribute='softwareComponents') | flatten }}"

    - name: Get the list of software bundles in the firmware repository
      ansible.builtin.debug:
        msg: "{{ result_repository_out.FirmwareRepository |
          selectattr('id', 'equalto', '8aaa80788b7') |
          map(attribute='softwareBundles') | flatten }}"