summaryrefslogtreecommitdiffstats
path: root/ansible_collections/dellemc/powerflex/playbooks/modules/sdc.yml
blob: b796f02da0aa4d47a1608716ec81db8aa3cc38fc (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
---
- name: SDC Operations
  hosts: localhost
  connection: local
  gather_facts: false
  vars:
    hostname: 'x.x.x.x'
    username: 'admin'
    password: 'Password'
    validate_certs: false
    sdc_name: test_sdc

  tasks:
    - name: Get sdc details using sdc ip
      register: result
      dellemc.powerflex.sdc:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        sdc_ip: "1.1.1.1"
        state: "present"

    - name: Set sdc id
      ansible.builtin.set_fact:
        sdc_id: "{{ result.sdc_details.id }}"

    - name: Rename sdc using sdc id
      dellemc.powerflex.sdc:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        sdc_id: "{{ sdc_id }}"
        sdc_new_name: "{{ sdc_name }}"
        state: "present"

    - name: Get sdc details using sdc name
      dellemc.powerflex.sdc:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        sdc_name: "{{ sdc_name }}"
        state: "present"

    - name: Set performance profile of sdc using sdc name
      dellemc.powerflex.sdc:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        sdc_name: "{{ sdc_name }}"
        performance_profile: "HighPerformance"
        state: "present"

    - name: Remove sdc
      dellemc.powerflex.sdc:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        sdc_name: "{{ sdc_name }}"
        state: "absent"