-
Notifications
You must be signed in to change notification settings - Fork 1
/
multivendor-provision-server.yml
executable file
·74 lines (69 loc) · 2.21 KB
/
multivendor-provision-server.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
---
- hosts: all
connection: local
name: Provision Server
gather_facts: False
vars:
oob_users:
- username: "qcadmin"
password: "qcpass"
role: "Administrator"
ipmirole: "Administrator"
share_host: "{{ vault_share_host }}"
scp_file: "R640_RAID1.xml"
reboot: False
job_wait: True
iso_image: "CentOS7-Kickstart.iso"
vars_files:
- ../vault.yml
tasks:
- name: Power On Server
community.general.redfish_command:
baseuri: "{{ oob_host }}"
username: "{{ vault_oob_username }}"
password: "{{ vault_oob_password }}"
category: Systems
command: PowerOn
- block:
- name: Import SCP
dellemc.openmanage.idrac_server_config_profile:
idrac_ip: "{{ oob_host }}"
idrac_user: "{{ vault_oob_username }}"
idrac_password: "{{ vault_oob_password }}"
share_name: "{{ share_host }}:/mnt/data/config"
command: "import"
scp_file: "{{ scp_file }}"
scp_components: "ALL"
shutdown_type: "Graceful"
job_wait: "True"
- name: Update Firmware
dellemc.openmanage.idrac_firmware:
idrac_ip: "{{ oob_host }}"
idrac_user: "{{ vault_oob_username }}"
idrac_password: "{{ vault_oob_password }}"
share_name: "{{ share_host }}:/mnt/data/drm/R640"
catalog_file_name: "R640_1.01_Catalog.xml"
share_mnt: "/mnt/mntpoint"
reboot: "{{ reboot }}"
job_wait: "{{ job_wait }}"
- name: Boot to Network ISO
dellemc.openmanage.idrac_os_deployment:
idrac_ip: "{{ oob_host }}"
idrac_user: "{{ vault_oob_username }}"
idrac_password: "{{ vault_oob_password }}"
share_name: "{{ share_host }}:/mnt/data/iso"
iso_image: "{{ iso_image }}"
when: oob_type == 'idrac'
- block:
- name: Configure HP iLO
hponcfg:
src: /tmp/enable-ssh.xml
- name: Boot to Network ISO
hpilo_boot:
host: "{{ oob_ip }}"
login: "{{ oob_user }}"
password: "{{ oob_password }}"
media: cdrom
image: http://some-web-server/iso/boot.iso
delegate_to: localhost
when: oob_type == 'ilo'