-
Notifications
You must be signed in to change notification settings - Fork 1
/
ome-provision-mx.yml
executable file
·184 lines (174 loc) · 6.61 KB
/
ome-provision-mx.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
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
---
- hosts: mx-chassis
connection: local
name: Provision Host
gather_facts: False
vars:
ansible_managed: "Created by Ansible on {{ '%Y-%m-%d %H:%M:%S' | strftime }}"
vars_files:
- vault.yml
roles:
- role: ome-alert-policy
vars:
hostname: "{{ vault_ome_host }}"
username: "{{ vault_ome_username }}"
password: "{{ vault_ome_password }}"
name: "TSTest"
description: "{{ ansible_managed }}"
tasks:
- name: Configure network for chassis
dellemc.openmanage.ome_device_mgmt_network:
hostname: "{{ vault_ome_host }}"
username: "{{ vault_ome_username }}"
password: "{{ vault_ome_password }}"
device_service_tag: "{{ service_tag }}"
ipv4_configuration:
enable_ipv4: True
enable_dhcp: True
#static_ip_address: 192.168.0.2
#static_subnet_mask: 255.255.254.0
#static_gateway: 192.168.0.3
use_dhcp_to_obtain_dns_server_address: True
#static_preferred_dns_server: 192.168.0.4
#static_alternate_dns_server: 192.168.0.5
ipv6_configuration:
enable_ipv6: False
enable_auto_configuration: False
#static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1
#static_prefix_length: 10
#static_gateway: ffff::2607:f2b1:f081:9
use_dhcpv6_to_obtain_dns_server_address: True
#static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3
#static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4
dns_configuration:
register_with_dns: true
#use_dhcp_for_dns_domain_name: false
dns_name: "{{ inventory_hostname | upper }}"
dns_domain_name: "example.com"
#auto_negotiation: no
#network_speed: 100_MB
#management_vlan:
# enable_vlan: true
# vlan_id: 3344
- name: Configure NTP server for time synchronization.
dellemc.openmanage.ome_application_network_time:
hostname: "{{ vault_ome_host }}"
username: "{{ vault_ome_username }}"
password: "{{ vault_ome_password }}"
enable_ntp: true
time_zone: "TZ_ID_9" # Mountain
primary_ntp_address: "0.centos.pool.ntp.org"
secondary_ntp_address1: "1.centos.pool.ntp.org"
- name: Update session time out
dellemc.openmanage.ome_application_network_webserver:
hostname: "{{ vault_ome_host }}"
username: "{{ vault_ome_username }}"
password: "{{ vault_ome_password }}"
webserver_timeout: 120 # Minutes, this is the max for the MX7000
# - name: Change password for root
# dellemc.openmanage.ome_user:
# hostname: "{{ vault_ome_host }}"
# username: "{{ vault_ome_username }}"
# password: "{{ vault_ome_password }}"
# state: "present"
# attributes:
# UserName: "root"
# Password: "calvin"
# RoleId: "10" # Chassis Administrator
# Enabled: True
- name: Create user
dellemc.openmanage.ome_user:
hostname: "{{ vault_ome_host }}"
username: "{{ vault_ome_username }}"
password: "{{ vault_ome_password }}"
state: "present"
attributes:
UserName: "ansibletest"
Password: "P@ssw0rd!"
RoleId: "16" # Viewer
Enabled: True
- name: Configure Chassis Slots
dellemc.openmanage.ome_chassis_slots:
hostname: "{{ vault_ome_host }}"
username: "{{ vault_ome_username }}"
password: "{{ vault_ome_password }}"
slot_options:
- chassis_service_tag: "{{ service_tag }}"
slots:
- slot_number: 1
slot_name: "{{ inventory_hostname | upper }}"
- slot_number: 2
slot_name: sled_name_2
- name: Configure Chassis Location
dellemc.openmanage.ome_device_location:
hostname: "{{ vault_ome_host }}"
username: "{{ vault_ome_username }}"
password: "{{ vault_ome_password }}"
device_service_tag: "{{ service_tag }}"
data_center: data center 2
room: room 7
aisle: aisle 4
rack: rack 6
rack_slot: 22
location: location 5
- name: Configure all local access settings of the host chassis.
dellemc.openmanage.ome_device_local_access_configuration:
hostname: "{{ vault_ome_host }}"
username: "{{ vault_ome_username }}"
password: "{{ vault_ome_password }}"
device_service_tag: "{{ service_tag }}"
enable_kvm_access: true
enable_chassis_direct_access: false
chassis_power_button:
enable_chassis_power_button: false
enable_lcd_override_pin: true
disabled_button_lcd_override_pin: 123456
quick_sync:
quick_sync_access: READ_WRITE
enable_read_authentication: true
enable_quick_sync_wifi: true
enable_inactivity_timeout: true
timeout_limit: 120
timeout_limit_unit: SECONDS
lcd:
lcd_access: VIEW_MODIFY
lcd_language: en
user_defined: "LCD Text"
- name: Configure Network Services
dellemc.openmanage.ome_device_network_services:
hostname: "{{ vault_ome_host }}"
username: "{{ vault_ome_username }}"
password: "{{ vault_ome_password }}"
device_service_tag: "{{ service_tag }}"
snmp_settings:
enabled: true
port_number: 161
community_name: public
ssh_settings:
enabled: true
port_number: 22
max_sessions: 25
max_auth_retries: 3
idle_timeout: 60
remote_racadm_settings:
enabled: false
- name: Configure SMTP
dellemc.openmanage.ome_application_alerts_smtp:
hostname: "{{ vault_ome_host }}"
username: "{{ vault_ome_username }}"
password: "{{ vault_ome_password }}"
destination_address: "smtp.example.com"
port_number: 25
use_ssl: false
enable_authentication: false
- name: Configure Chassis Power Settings
dellemc.openmanage.ome_device_power_settings:
hostname: "{{ vault_ome_host }}"
username: "{{ vault_ome_username }}"
password: "{{ vault_ome_password }}"
device_service_tag: "{{ service_tag }}"
redundancy_configuration:
redundancy_policy: GRID_REDUNDANCY
hot_spare_configuration:
enable_hot_spare: true
primary_grid: GRID_1