-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathcreate_server_profile_with_deployment_plan.yml
49 lines (46 loc) · 1.93 KB
/
create_server_profile_with_deployment_plan.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
###
# 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.
###
---
- name: Deploy node webservers on RHEL 7.2 servers
hosts: all
gather_facts: no
vars:
- config: "{{ playbook_dir }}/oneview_config.json"
- deployment_network_uri: '/rest/ethernet-networks/b2b0669c-fa68-4f75-9f51-af607269b32b'
- enclosure_group_uri: '/rest/enclosure-groups/1ae73c92-d598-4f65-ac96-f417a55039f3'
- deployment_plan_name: 'install-nodejs4.2-stack-RHEL7.2'
- management_ntwrk_uri: '/rest/ethernet-networks/e75ac764-6a41-47c5-8e37-53c4265d39bd'
tasks:
- name : "Create server profile with deployment plan {{ deployment_plan_name }}"
delegate_to: localhost
oneview_server_profile:
config: "{{ config }}"
data:
name: "{{ inventory_hostname }}"
server_template: "webserver-template"
osDeploymentSettings:
osDeploymentPlanName: "{{ deployment_plan_name }}"
osCustomAttributes:
- name: MgmtNIC1.connectionid
value: 1
- name: MgmtNIC1.dhcp
value: false
- name: MgmtNIC1.ipv4disable
value: false
- name: MgmtNIC1.networkuri
value: "{{ management_ntwrk_uri }}"
- name: MgmtNIC1.constraint
value: auto