Debian Codegraph @

ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_boot_virtual_media_workflow.yml

raw symbols SCIP
1 ---
2 - name: Dell OpenManage Ansible iDRAC boot operations.
3 hosts: idrac
4 vars:
5 ansible_python_interpreter: /usr/bin/python3
6 virtual_media_uri: "/redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD/Actions/VirtualMedia.InsertMedia"
7 file_location: "192.168.0.1:/nfsshare/path/to/boot_image.iso"
8 nfs_dir: "192.168.0.1:/nfsshare"
9 iso_file: "boot_image.iso"
10 ca_path: "/path/to/ca_cert.pem"
11 boot_source_mode: "legacy" # other options are UEFI
12
13 gather_facts: false
14
15 tasks:
16 # Mount the ISO image as a virtual media CD.
17 - name: "Insert virtual media"
18 ansible.builtin.uri:
19 url: "https://{{ idrac_ip }}{{ virtual_media_uri }}"
20 user: "{{ idrac_user }}"
21 password: "{{ idrac_password }}"
22 method: "POST"
23 body_format: json
24 body:
25 Image: "{{ file_location }}"
26 Inserted: true
27 WriteProtected: true
28 use_proxy: true
29 status_code: 204
30 return_content: false
31 ca_path: "{{ ca_path }}"
32 force_basic_auth: true
33 headers:
34 Content-Type: "application/json"
35 Accept: "application/json"
36 tags:
37 - virtual_media
38 - vm_boot
39 delegate_to: localhost
40
41 # One-time boot with virtual media.
42 - name: Boot once from mounted CD.
43 dellemc.openmanage.idrac_boot:
44 idrac_ip: "{{ idrac_ip }}"
45 idrac_user: "{{ idrac_user }}"
46 idrac_password: "{{ idrac_password }}"
47 ca_path: "{{ ca_path }}"
48 boot_source_override_mode: "{{ boot_source_mode }}"
49 boot_source_override_target: cd
50 boot_source_override_enabled: once
51 tags:
52 - boot_cd
53 - vm_boot
54 delegate_to: localhost
55 # Eject the virtual media after boot.