-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.2-Playbook-configure-dd-atos-aws.yml
81 lines (75 loc) · 2.7 KB
/
2.2-Playbook-configure-dd-atos-aws.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
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
# Example Playbok to configure PPDD
- name: Configure PowerProtect DataDomain ATOS ( Active Tier on Object) for AWS
hosts: localhost
gather_facts: no
connection: local
vars_files:
- ./vars/main.yml
tasks:
- name: Checking if PPDD FQDN / IP is set
fail:
msg: "We do not have ppdd fqdn set !"
when: (ppdd_fqdn is not defined) or (ppdd_fqdn|length <= 8)
- name: Checking PPDD_PASSWORD is set
fail:
msg: "We do not have ppdd_password set !"
when: (ppdd_password is not defined) or (ppdd_password|length == 0)
- name: Checking if atos_bucket is set
fail:
msg: "We do not have atos_bucket set !"
when: (atos_bucket is not defined) or (atos_bucket|length <= 8)
- name: Setting Base URL
set_fact:
ppdd_baseurl: "{{ ppdd_fqdn }}"
- name: Check DataDomain Appliance Ready {{ ppdd_fqdn }}
include_role:
name: wait_ppdd_api_ready
- debug:
msg: "{{ result }}"
verbosity: 1
- name: Get PPDD Token for {{ ppdd_fqdn }}
vars:
username: "{{ ppdd_username }}"
password: "{{ ppdd_password }}"
include_role:
name: get_ppdd_token
- debug:
msg: "{{ access_token }}"
verbosity: 1
- name: Get Active Tier on Object Status
include_role:
name: get_ppdd_file-systems_object-stores
- name: Get Appliance Disks {{ ppdd_fqdn }}
include_role:
name: get_ppdd_disks
vars:
filter: "status=UNKNOWN and tierType=OTHER and capacity=(1073741824000,2147483648000)"
- debug:
msg: "{{ disks | json_query('diskInfo[].device') }}"
verbosity: 0
- name: Create Active Tier on Object
include_role:
name: set_ppdd_file-systems_object-stores_aws
vars:
bucket: "{{ atos_bucket }}"
devices: "{{ disks | json_query('diskInfo[].device') }}"
when: ( disks | json_query('diskInfo[].device') | default('', false) | trim != '' ) and file_systems_object_stores.enabled == false
- name: Get Active Tier on AWS Object Status
include_role:
name: get_ppdd_file-systems_object-stores_aws
when: ((file_systems_object_stores.enabled is defined and file_systems_object_stores.enabled == true) and (file_systems_object_stores.providerName is defined and file_systems_object_stores.providerName == "AWS")) or file_systems_object_stores.object_store_info_aws is defined
- name: Create FileSystem, this might take a while
include_role:
name: set_ppdd_file-systems
vars:
operation: "create"
- name: Enable FileSystem
include_role:
name: set_ppdd_file-systems
vars:
operation: "enable"
- name: Enable DDBoost
include_role:
name: set_ppdd_boostService
vars:
operation: "enable"