summaryrefslogtreecommitdiffstats
path: root/ansible_collections/dellemc/powerflex/playbooks/modules/mdm_cluster.yml
blob: bdc44bdfab2775f77b4468f237d7cd778c7b2bb2 (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
138
139
140
141
142
143
144
145
146
147
148
---
- name: MDM cluster Operations
  hosts: localhost
  connection: local
  gather_facts: false
  vars:
    hostname: 'x.x.x.x'
    username: 'admin'
    password: 'Password'
    validate_certs: false
    host_port: 443

  tasks:
    - name: Get MDM cluster
      dellemc.powerflex.mdm_cluster:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        port: "{{ host_port }}"
        state: "present"

    - name: Rename MDM cluster with check_mode
      dellemc.powerflex.mdm_cluster:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        port: "{{ host_port }}"
        mdm_id: "1c13c3847c971201"
        mdm_new_name: "node_renamed"
        state: "present"
      check_mode: true

    - name: Rename MDM cluster
      dellemc.powerflex.mdm_cluster:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        port: "{{ host_port }}"
        mdm_id: "1c13c3847c971201"
        mdm_new_name: "node_renamed"
        state: "present"

    - name: Remove standby MDM
      dellemc.powerflex.mdm_cluster:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        port: "{{ host_port }}"
        mdm_name: "mdm_node1"
        state: "absent"

    - name: Add standby MDM
      dellemc.powerflex.mdm_cluster:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        port: "{{ host_port }}"
        mdm_name: "mdm_standby_node"
        standby_mdm:
          mdm_ips:
            - "10.x.x.x"
          role: "TieBreaker"
          management_ips:
            - "10.x.x.x"
          port: 9011
        state: "present"

    - name: Change MDM cluster owner
      dellemc.powerflex.mdm_cluster:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        port: "{{ host_port }}"
        mdm_name: "node_renamed"
        is_primary: true
        state: "present"

    - name: Change virtual IP interface
      dellemc.powerflex.mdm_cluster:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        port: "{{ host_port }}"
        mdm_name: "mdm_manager_node"
        virtual_ip_interfaces:
          - "ens224"
          - "ens256"
        state: "present"

    - name: Clear virtual IP interface
      dellemc.powerflex.mdm_cluster:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        port: "{{ host_port }}"
        mdm_name: "mdm_manager_node"
        clear_interfaces: true
        state: "present"

    - name: Change Performance profile
      dellemc.powerflex.mdm_cluster:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        port: "{{ host_port }}"
        performance_profile: "Compact"
        state: "present"

    - name: Switch cluster mode to FiveNodes
      dellemc.powerflex.mdm_cluster:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        port: "{{ host_port }}"
        cluster_mode: "FiveNodes"
        mdm:
          - mdm_name: "mdm_manger_node"
            mdm_type: "Secondary"
          - mdm_name: "mdm_tiebreaker_node"
            mdm_type: "TieBreaker"
        mdm_state: "present-in-cluster"
        state: "present"

    - name: Switch cluster mode to ThreeNodes
      dellemc.powerflex.mdm_cluster:
        hostname: "{{ hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        validate_certs: "{{ validate_certs }}"
        port: "{{ host_port }}"
        cluster_mode: "ThreeNodes"
        mdm:
          - mdm_name: "mdm_manger_node"
            mdm_type: "Secondary"
          - mdm_name: "mdm_tiebreaker_node"
            mdm_type: "TieBreaker"
        mdm_state: "absent-in-cluster"
        state: "present"