-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcreate_server_profile_template.yml
102 lines (101 loc) · 3.57 KB
/
create_server_profile_template.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
###
# Copyright (2017) Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
###
---
- hosts: localhost
vars:
config: "{{ playbook_dir }}/config.json"
server_profile_template_name: "DCOS Master Node 2"
server_hardware_type_name: "BL460c Gen8 1"
enclosure_group_name: "EG-EcoSystem"
tasks:
- name: Create a basic connection-less server profile template
oneview_server_profile_template:
config: "{{ config }}"
state: present
data:
name: "{{ server_profile_template_name }}"
serverHardwareTypeName: "{{ server_hardware_type_name }}"
enclosureGroupName: "{{ enclosure_group_name }}"
#delegate_to: localhost
- name: Update bootMode from recently created template
oneview_server_profile_template:
config: "{{ config }}"
state: present
data:
name: "{{ server_profile_template_name }}"
serverHardwareTypeName: "{{ server_hardware_type_name }}"
enclosureGroupName: "{{ enclosure_group_name }}"
bootMode:
#manageMode: True
#pxeBootPolicy: Auto
#mode: "UEFI"
boot:
manageBoot: true
order:
- PXE
- CD
- Floppy
- USB
- HardDisk
#delegate_to: localhost
- name: Create Connections for recently created templates
oneview_server_profile_template:
config: "{{ config }}"
state: present
data:
name: "{{ server_profile_template_name }}"
serverHardwareTypeName: "{{ server_hardware_type_name }}"
enclosureGroupName: "{{ enclosure_group_name }}"
connections:
- id: 1
name: "Deployment"
functionType: Ethernet
portId: Flb 1:1-a
requestedVFs: Auto
requestedMbps: 2500
networkUri: "/rest/ethernet-networks/55a60775-7f68-435e-b66a-59242c76779e"
boot:
priority: Primary
- id: 2
name: "Management"
functionType: Ethernet
portId: Flb 1:2-a
requestedVFs: Auto
requestedMbps: 2500
networkUri: "/rest/ethernet-networks/4cdcc4ae-5b5a-44c5-aa1b-9ed11c8867a0"
boot:
priority: NotBootable
#delegate_to: localhost
- name: Create logicalDrives for recently created templates
oneview_server_profile_template:
config: "{{ config }}"
state: present
data:
name: "{{ server_profile_template_name }}"
serverHardwareTypeName: "{{ server_hardware_type_name }}"
enclosureGroupName: "{{ enclosure_group_name }}"
localStorage:
controllers:
- deviceSlot: Embedded
mode: RAID
initialize: true
logicalDrives:
- name: Boot
raidLevel: RAID0
bootable: true
numPhysicalDrives: 1
driveTechnology:
#delegate_to: localhost