Debian Codegraph @

ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/main.yml

raw symbols SCIP
1 ---
2 # tasks file for idrac_os_deployment
3 - name: Operating system deployment on iDRAC
4 block:
5 - name: Validate the Inputs
6 ansible.builtin.include_tasks: common/validate_inputs.yml
7
8 - name: Create working directory , kickstart file and compile iso
9 when: source.is_custom_iso is undefined or source.is_custom_iso is false
10 block:
11 - name: Create working directory
12 ansible.builtin.include_tasks: common/create_working_directory_path.yml
13
14 - name: Download the Source iso
15 ansible.builtin.include_tasks: common/download_or_copy_source_files.yml
16
17 - name: Generate Kickstart file
18 when: source.ks_path is undefined
19 ansible.builtin.include_tasks: iso/generate_kickstart_file.yml
20
21 - name: Extract ISO
22 ansible.builtin.include_tasks: iso/extract_iso.yml
23
24 - name: Compile iso for the OS
25 ansible.builtin.include_tasks: "{{ os_name | lower }}/compile_iso.yml"
26
27 - name: Copy the iso to the destination
28 ansible.builtin.include_tasks: common/copy_iso_to_destination.yml
29
30 - name: Attach the Virtual Media to idrac
31 ansible.builtin.include_tasks: idrac/attach_iso_to_virtual_media.yml
32
33 - name: Set Boot Mode to once and restart the idrac
34 ansible.builtin.include_tasks: idrac/set_boot_mode_and_restart.yml
35
36 - name: Track for OS deployment
37 when: wait_for_os_deployment is true
38 ansible.builtin.include_tasks: tracking/track_for_os_deployment.yml
39
40 rescue:
41 - name: Set the failure messages
42 no_log: "{{ idrac_os_deployment_set_no_log }}"
43 ansible.builtin.set_fact:
44 idrac_os_deployment_failure: "{{ ansible_failed_result | combine({'failed_task_name': ansible_failed_task.name}) }}"
45
46 always:
47 - name: Clean up the Source and destination
48 when: source.is_custom_iso is undefined or source.is_custom_iso is false
49 block:
50 - name: Clean up the local directories
51 ansible.builtin.include_tasks: clean_up/clean_up_working_directory.yml
52
53 - name: Clean up the destination
54 when:
55 - wait_for_os_deployment is true and delete_custom_iso is true
56 - idrac_os_deployment_copied_to_destination is true
57 ansible.builtin.include_tasks: clean_up/clean_up_destinations.yml
58
59 - name: Clean up the virtual Media
60 when:
61 - wait_for_os_deployment is true and eject_iso is true
62 - idrac_os_deployment_virtual_media_attached is true
63 ansible.builtin.include_tasks: idrac/clean_up_virtual_media_slot.yml
64
65 - name: Report task failure
66 when: idrac_os_deployment_failure is defined
67 ansible.builtin.debug:
68 var: idrac_os_deployment_failure
69 failed_when: true
70
71 - name: Report operating system deployment success
72 when: idrac_os_deployment_failure is undefined and idrac_os_deployment_out != ""
73 ansible.builtin.debug:
74 var: idrac_os_deployment_out