-
Notifications
You must be signed in to change notification settings - Fork 1
/
ome-deploy-template.yml
executable file
·48 lines (45 loc) · 1.46 KB
/
ome-deploy-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
---
- hosts: mx
connection: local
name: Provision Host
gather_facts: False
vars_files:
- vault.yml
tasks:
- name: Deploy Template
dellemc.openmanage.ome_template:
hostname: "{{ vault_ome_host }}"
username: "{{ vault_ome_username }}"
password: "{{ vault_ome_password }}"
command: "deploy"
template_name: "MX740c_New"
device_service_tag:
- "{{ service_tag }}"
attributes:
NetworkBootIsoModel:
BootToNetwork: true
ShareType: "NFS"
IsoPath: "/mnt/data/iso/CentOS7-Unattended.iso"
IsoTimeout: 1 # Hour
ShareDetail:
IpAddress: "{{ vault_share_host }}"
ShareName: "iso"
User: ""
Password: ""
register: output_deploy
- debug:
var: output_deploy
- name: Wait on Deploy to Complete
dellemc.openmanage.ome_job_info:
hostname: "{{ vault_ome_host }}"
username: "{{ vault_ome_username }}"
password: "{{ vault_ome_password }}"
job_id: "{{ output_deploy.return_id }}"
register: output_job
failed_when: output_job.job_info.LastRunStatus.Name == 'Failed'
changed_when: output_job.job_info.LastRunStatus.Name == 'Completed'
until: output_job.job_info.LastRunStatus.Name in ['Completed', 'Failed', 'Warning', 'Aborted', 'Paused', 'Stopped', 'Cancelled']
retries: 90
delay: 10 # 15 Minutes
- debug:
var: output_job