浏览代码

Merge pull request #688 from abhishek-sa1/devel

Issue #683: Custom ISO creation for Leap OS - iDRAC Provisioning
Sujit Jadhav 3 年之前
父节点
当前提交
b75ffa3f51

+ 84 - 0
control_plane/roles/control_plane_customiso/files/temp_leap15.xml

@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!DOCTYPE profile>
+<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
+  <install>
+    <init>
+      <info_file>
+        <![CDATA[
+          textmode: 1]]>
+      </info_file>
+    </init>
+  </install>
+  <general>
+    <mode>
+      <confirm config:type="boolean">false</confirm>
+      <final_reboot config:type="boolean">true</final_reboot>
+    </mode>
+  </general>
+  <bootloader t="map">
+    <loader_type>default</loader_type>
+  </bootloader>
+  <host t="map">
+    <hosts t="list">
+      <hosts_entry t="map">
+        <host_address>127.0.0.1</host_address>
+        <names t="list">
+          <name>localhost</name>
+        </names>
+      </hosts_entry>
+    </hosts>
+  </host>
+  <networking t="map">
+    <dns t="map">
+      <dhcp_hostname t="boolean">false</dhcp_hostname>
+      <hostname>localhost.localdomain</hostname>
+      <resolv_conf_policy>auto</resolv_conf_policy>
+    </dns>
+  </networking>
+  <services-manager t="map">
+    <services t="map">
+      <enable t="list">
+        <service>chronyd</service>
+        <service>sshd</service>
+      </enable>
+    </services>
+  </services-manager>
+  <software t="map">
+    <install_recommended t="boolean">true</install_recommended>
+    <instsource/>
+    <packages t="list">
+      <package>openssh</package>
+      <package>firewalld</package>
+      <package>chrony</package>
+    </packages>
+  </software>
+  <ssh_import t="map">
+    <copy_config t="boolean">false</copy_config>
+    <import t="boolean">false</import>
+  </ssh_import>
+  <timezone t="map">
+    <timezone>ks_timezone</timezone>
+  </timezone>
+  <users t="list">
+    <user t="map">
+      <authorized_keys t="list"/>
+      <encrypted t="boolean">true</encrypted>
+      <fullname>root</fullname>
+      <gid>0</gid>
+      <home>/root</home>
+      <home_btrfs_subvolume t="boolean">false</home_btrfs_subvolume>
+      <password_settings t="map">
+        <expire/>
+        <flag/>
+        <inact/>
+        <max/>
+        <min/>
+        <warn/>
+      </password_settings>
+      <shell>/bin/bash</shell>
+      <uid>0</uid>
+      <user_password>ks_password</user_password>
+      <username>root</username>
+    </user>
+  </users>
+</profile>

+ 17 - 5
control_plane/roles/control_plane_customiso/tasks/check_prerequisites.yml

@@ -1,4 +1,4 @@
-# Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
+# Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,15 +13,26 @@
 # limitations under the License.
 ---
 
-- name: Install genisoimage package
+- name: Install xorriso package - rocky
   package:
-    name: genisoimage
+    name: xorriso
     state: present
   tags: install
+  when:
+    - ansible_distribution | lower == os_supported_centos or
+      ansible_distribution | lower == os_supported_rocky
+
+- name: Install xorriso package - leap
+  zypper:
+    name: xorriso
+    state: present
+  tags: install
+  when: os_supported_leap in ansible_distribution | lower
 
 - name: Install ansible-galaxy modules
   command: ansible-galaxy collection install {{ item }}
   changed_when: true
+  tags: install
   with_items:
    - community.general
    - dellemc.openmanage
@@ -34,7 +45,7 @@
 
 - name: Check iso mount folder
   stat:
-    path: "{{ iso_mount_path }}{{ isolinux_cfg_path }}"
+    path: "{{ iso_mount_path }}{{ grub_cfg_path }}"
   register: check_mount_iso
   tags: install
 
@@ -50,4 +61,5 @@
     path: "{{ role_path }}/../provision_idrac/files/{{ management_station_ip_file }}"
     line: "{{ mngmnt_network_ip }}"
     mode: "{{ file_permission }}"
-    create: yes
+    create: yes
+  tags: install

+ 30 - 24
control_plane/roles/control_plane_customiso/tasks/create_unattended_iso.yml

@@ -1,4 +1,4 @@
-#  Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
+#  Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
   block:
     - name: Create custom ISO
       command: >-
-        mkisofs -o /tmp/{{ centos_iso_filename }} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4
+        xorriso -as mkisofs -o {{ nfs_share_offline_repo }}/{{ centos_iso_filename }} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4
         -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot -J -R -V "CentOS 7 x86_64"  {{ tmp_iso_dir }}
       changed_when: true
       register: centos_iso_status
@@ -28,18 +28,10 @@
     - name: Custom ISO creation status check
       assert:
         that:
-          - "'Total directory bytes:' in centos_iso_status.stderr"
-          - "'Path table size(bytes):' in centos_iso_status.stderr"
-          - "'Max brk space used' in centos_iso_status.stderr"
-          - "'extents written' in centos_iso_status.stderr"
+          - custom_iso_success_keyword1 in centos_iso_status.stderr
+          - custom_iso_success_keyword2 in centos_iso_status.stderr
         success_msg: "{{ custom_iso_success_msg }}"
         fail_msg: "{{ custom_iso_fail_msg }}"
-
-    - name: Copy ISO file to nfs share
-      copy:
-        src: "/tmp/{{ centos_iso_filename }}"
-        dest: "{{ nfs_share_offline_repo }}/{{ centos_iso_filename }}"
-        mode: preserve
       tags: install
   when: provision_os == os_supported_centos
 
@@ -47,7 +39,7 @@
   block:
     - name: Create custom ISO
       command: >-
-        mkisofs -o /tmp/{{ rocky_iso_filename }} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4
+        xorriso -as mkisofs -o {{ nfs_share_offline_repo }}/{{ rocky_iso_filename }} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4
         -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot -J -R -V "Rocky-8-4-x86_64-dvd"  {{ tmp_iso_dir }}
       changed_when: true
       register: rocky_iso_status
@@ -58,23 +50,37 @@
     - name: Custom ISO creation status check
       assert:
         that:
-          - "'Total directory bytes:' in rocky_iso_status.stderr"
-          - "'Path table size(bytes):' in rocky_iso_status.stderr"
-          - "'Max brk space used' in rocky_iso_status.stderr"
-          - "'extents written' in rocky_iso_status.stderr"
+          - custom_iso_success_keyword1 in rocky_iso_status.stderr
+          - custom_iso_success_keyword2 in rocky_iso_status.stderr
         success_msg: "{{ custom_iso_success_msg }}"
         fail_msg: "{{ custom_iso_fail_msg }}"
-
-    - name: Copy ISO file to nfs share
-      copy:
-        src: "/tmp/{{ rocky_iso_filename }}"
-        dest: "{{ nfs_share_offline_repo }}/{{ rocky_iso_filename }}"
-        mode: preserve
       tags: install
   when: provision_os == os_supported_rocky
 
+- name: ISO creation - leap
+  block:
+    - name: Create custom ISO
+      command: >-
+        xorriso -as mkisofs -no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 4 -b boot/x86_64/loader/isolinux.bin 
+        -c boot/x86_64/loader/boot.cat -eltorito-alt-boot -e boot/x86_64/efi -no-emul-boot -o {{ nfs_share_offline_repo }}/{{ leap_iso_filename }} {{ tmp_iso_dir }}
+      changed_when: true
+      register: leap_iso_status
+      tags: install
+      args:
+        chdir: "{{ tmp_iso_dir }}"
+
+    - name: Custom ISO creation status check
+      assert:
+        that:
+          - custom_iso_success_keyword1 in leap_iso_status.stderr
+          - custom_iso_success_keyword2 in leap_iso_status.stderr
+        success_msg: "{{ custom_iso_success_msg }}"
+        fail_msg: "{{ custom_iso_fail_msg }}"
+      tags: install
+  when: provision_os == os_supported_leap
+
 - name: Remove the kickstart file
   file:
     path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
     state: absent
-  tags: install
+  tags: install

+ 172 - 106
control_plane/roles/control_plane_customiso/tasks/edit_iso_config.yml

@@ -1,4 +1,4 @@
-# Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
+# Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -15,68 +15,11 @@
 
 - name: Include control_plane_common vars
   include_vars: ../../control_plane_common/vars/main.yml
+  tags: install
 
 - name: Include provision_cobbler vars
   include_vars: ../../provision_cobbler/vars/main.yml
-
-- name: Copy files to tmp folder
-  command: cp -r {{ iso_mount_path }} /tmp/
-  changed_when: true
-  tags: install
-
-- name: Set centos kickstart file name
-  set_fact:
-    idrac_kickstart_file: "{{ idrac_centos_ks }}"
-  when: provision_os == os_supported_centos
-
-- name: Set rocky kickstart file name
-  set_fact:
-    idrac_kickstart_file: "{{ idrac_rocky_ks }}"
-  when: provision_os == os_supported_rocky
-
-- name: Edit isolinux.cfg
-  replace:
-    path: "{{ tmp_iso_dir }}{{ isolinux_cfg_path }}"
-    regexp: "{{ item.regexp }}"
-    replace: "{{ item.replace }}"
-  with_items:
-    - { regexp: "append initrd=initrd.img", replace: "append initrd=initrd.img ks=cdrom:/{{ idrac_kickstart_file }}" }
-    - { regexp: "rd.live.check quiet", replace: "" }
-  tags: install
-
-- name: Edit grub.cfg
-  replace:
-    path: "{{ tmp_iso_dir }}{{ grub_cfg_path }}"
-    regexp: "{{ item.regexp }}"
-    replace: "{{ item.replace }}"
-  with_items:
-    - { regexp: "timeout=60", replace: "timeout=5" }
-    - { regexp: "kernel /images/pxeboot/vmlinuz", replace: "kernel /images/pxeboot/vmlinuz ks=cdrom:/{{ idrac_kickstart_file }}" }
-    - { regexp: "linuxefi /images/pxeboot/vmlinuz", replace: "linuxefi /images/pxeboot/vmlinuz ks=cdrom:/{{ idrac_kickstart_file }}" }
-    - { regexp: "rd.live.check quiet", replace: "" }
-  tags: install
-
-- name: Remove the kickstart file if exists
-  file:
-    path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
-    state: absent
-  tags: install
-
-- name: Create the centos kickstart file
-  copy:
-    src: "{{ role_path }}/files/temp_centos7.cfg"
-    dest: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
-    mode: "{{ file_permission }}"
-  tags: install
-  when: provision_os == os_supported_centos
-  
-- name: Create the rocky kickstart file
-  copy:
-    src: "{{ role_path }}/files/temp_rocky8.cfg"
-    dest: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
-    mode: "{{ file_permission }}"
   tags: install
-  when: provision_os == os_supported_rocky
 
 - name: Random phrase generation
   command: openssl rand -base64 12
@@ -92,54 +35,177 @@
   register: encrypt_login_pass
   tags: install
 
-- name: Configure kickstart file - Password
-  replace:
-    path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
-    regexp: '^rootpw --iscrypted ks_password'
-    replace: 'rootpw --iscrypted {{ encrypt_login_pass.stdout }}'
-  no_log: true
-  tags: install
-
-- name: Configure kickstart file centos - nic
-  lineinfile:
-    path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
-    insertafter: '^network  --bootproto=dhcp --device=link --onboot=on --activate'
-    line: 'network  --bootproto=dhcp --device={{ item }} --onboot=on --activate'
-  tags: install
-  with_items: "{{ centos_host_nic }}"
-  when: provision_os == os_supported_centos
-
-- name: Configure kickstart file rocky - nic
-  lineinfile:
-    path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
-    insertafter: '^network  --bootproto=dhcp --device=link --onboot=on --activate'
-    line: 'network  --bootproto=dhcp --device={{ item }} --onboot=on --activate'
-  tags: install
-  with_items: "{{ rocky_host_nic }}"
-  when: provision_os == os_supported_rocky
-
-- name: Configure kickstart file - timezone
-  replace:
-    path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
-    regexp: '^timezone --utc ks_timezone'
-    replace: 'timezone --utc {{ timezone }}'
-  tags: install
-
-- name: Configure kickstart file - language
-  replace:
-    path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
-    regexp: '^lang ks_language'
-    replace: 'lang {{ language }}'
+- name: Create a tmp iso directory
+  file:
+    path: "{{ tmp_iso_dir }}"
+    state: directory
+    mode: "{{ file_permission }}"
   tags: install
 
-- name: Copy kickstart file to iso mount path
-  copy:
-    src: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
-    dest: "{{ tmp_iso_dir }}{{ idrac_kickstart_file }}"
-    mode: preserve
+- name: Copy files to tmp folder
+  command:  rsync -AHPSXav {{ iso_mount_path }} {{ tmp_iso_dir }}
+  changed_when: true
+  args:
+    warn: false
   tags: install
 
-- name: Remove ^M characters
-  command: dos2unix {{ tmp_iso_dir }}{{ idrac_kickstart_file }}
-  changed_when: false
-  failed_when: false
+- block:
+    - block:
+        - name: Set centos kickstart file name
+          set_fact:
+            idrac_kickstart_file: "{{ idrac_centos_ks }}"
+          tags: install
+
+        - name: Remove the kickstart file if exists
+          file:
+            path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
+            state: absent
+          tags: install
+
+        - name: Create the centos kickstart file
+          copy:
+            src: "{{ role_path }}/files/temp_centos7.cfg"
+            dest: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
+            mode: "{{ file_permission }}"
+          tags: install
+
+        - name: Configure kickstart file centos - nic
+          lineinfile:
+            path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
+            insertafter: '^network  --bootproto=dhcp --device=link --onboot=on --activate'
+            line: 'network  --bootproto=dhcp --device={{ item }} --onboot=on --activate'
+          tags: install
+          with_items: "{{ centos_host_nic }}"
+      when: provision_os == os_supported_centos
+
+    - block:
+        - name: Set rocky kickstart file name
+          set_fact:
+            idrac_kickstart_file: "{{ idrac_rocky_ks }}"
+          tags: install
+
+        - name: Remove the kickstart file if exists
+          file:
+            path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
+            state: absent
+          tags: install
+
+        - name: Create the rocky kickstart file
+          copy:
+            src: "{{ role_path }}/files/temp_rocky8.cfg"
+            dest: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
+            mode: "{{ file_permission }}"
+          tags: install
+
+        - name: Configure kickstart file rocky - nic
+          lineinfile:
+            path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
+            insertafter: '^network  --bootproto=dhcp --device=link --onboot=on --activate'
+            line: 'network  --bootproto=dhcp --device={{ item }} --onboot=on --activate'
+          tags: install
+          with_items: "{{ rocky_host_nic }}"
+      when: provision_os == os_supported_rocky
+
+    - name: Configure kickstart file - Password
+      replace:
+        path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
+        regexp: '^rootpw --iscrypted ks_password'
+        replace: 'rootpw --iscrypted {{ encrypt_login_pass.stdout }}'
+      no_log: true
+      tags: install
+
+    - name: Configure kickstart file - timezone
+      replace:
+        path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
+        regexp: '^timezone --utc ks_timezone'
+        replace: 'timezone --utc {{ timezone }}'
+      tags: install
+
+    - name: Configure kickstart file - language
+      replace:
+        path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
+        regexp: '^lang ks_language'
+        replace: 'lang {{ language }}'
+      tags: install
+
+    - name: Copy kickstart file to iso mount path
+      copy:
+        src: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
+        dest: "{{ tmp_iso_dir }}{{ idrac_kickstart_file }}"
+        mode: preserve
+      tags: install
+
+    - name: Remove ^M characters
+      command: dos2unix {{ tmp_iso_dir }}{{ idrac_kickstart_file }}
+      changed_when: false
+      failed_when: false
+
+    - name: Edit isolinux.cfg
+      replace:
+        path: "{{ tmp_iso_dir }}{{ isolinux_cfg_path }}"
+        regexp: "{{ item.regexp }}"
+        replace: "{{ item.replace }}"
+      with_items:
+        - { regexp: "append initrd=initrd.img", replace: "append initrd=initrd.img ks=cdrom:/{{ idrac_kickstart_file }}" }
+        - { regexp: "rd.live.check quiet", replace: "" }
+      tags: install
+
+    - name: Edit grub.cfg
+      replace:
+        path: "{{ tmp_iso_dir }}{{ grub_cfg_path }}"
+        regexp: "{{ item.regexp }}"
+        replace: "{{ item.replace }}"
+      with_items:
+        - { regexp: "timeout=60", replace: "timeout=5" }
+        - { regexp: "kernel /images/pxeboot/vmlinuz", replace: "kernel /images/pxeboot/vmlinuz ks=cdrom:/{{ idrac_kickstart_file }}" }
+        - { regexp: "linuxefi /images/pxeboot/vmlinuz", replace: "linuxefi /images/pxeboot/vmlinuz ks=cdrom:/{{ idrac_kickstart_file }}" }
+        - { regexp: "rd.live.check quiet", replace: "" }
+      tags: install
+  when:
+    - provision_os == os_supported_rocky or
+      provision_os == os_supported_centos
+
+- block:
+    - name: Set leap kickstart file name
+      set_fact:
+        idrac_kickstart_file: "{{ idrac_leap_ks }}"
+      tags: install
+  
+    - name: Create the leap kickstart file
+      copy:
+        src: "{{ role_path }}/files/temp_leap15.xml"
+        dest: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
+        mode: "{{ file_permission }}"
+      tags: install
+
+    - name: Configure kickstart file - Password
+      replace:
+        path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
+        regexp: '      <user_password>ks_password</user_password>'
+        replace: '      <user_password>{{ encrypt_login_pass.stdout }}</user_password>'
+      no_log: true
+      tags: install
+
+    - name: Configure kickstart file - timezone
+      replace:
+        path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
+        regexp: '    <timezone>ks_timezone</timezone>'
+        replace: '    <timezone>{{ timezone }}</timezone>'
+      tags: install
+
+    - name: Copy kickstart file to iso mount path
+      copy:
+        src: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
+        dest: "/tmp/leap/{{ idrac_kickstart_file }}"
+        mode: preserve
+      tags: install
+
+    - name: Edit grub.cfg
+      replace:
+        path: "{{ tmp_iso_dir }}{{ grub_cfg_path }}"
+        regexp: "{{ item.regexp }}"
+        replace: "{{ item.replace }}"
+      with_items:
+        - { regexp: "  timeout=60", replace: "  timeout=5" }
+      tags: install
+  when: provision_os == os_supported_leap

+ 2 - 2
control_plane/roles/control_plane_customiso/tasks/main.yml

@@ -1,4 +1,4 @@
-#  Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
+#  Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -22,4 +22,4 @@
   include_tasks: edit_iso_config.yml
 
 - name: Create unattended iso file
-  include_tasks: create_unattended_iso.yml
+  include_tasks: create_unattended_iso.yml

+ 7 - 3
control_plane/roles/control_plane_customiso/vars/main.yml

@@ -1,4 +1,4 @@
-# Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
+# Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,11 +18,13 @@
 #Usage: check_prerequisites.yml
 iso_mount_path: /mnt/iso/
 iso_mount_check_fail_msg: "ISO file not mounted. Ensure /mnt/iso path is mounted with {{ provision_os }} ISO file."
+management_station_ip_file: "management_station_ip.txt"
 
 #Usage: edit_iso_config.yml
-tmp_iso_dir: /tmp/iso/
+tmp_iso_dir: /tmp/{{ provision_os }}/
 idrac_centos_ks: centos7.cfg
 idrac_rocky_ks: rocky8.cfg
+idrac_leap_ks: autoinst.xml
 file_permission: 0744
 isolinux_cfg_path: isolinux/isolinux.cfg
 grub_cfg_path: EFI/BOOT/grub.cfg
@@ -30,6 +32,8 @@ grub_cfg_path: EFI/BOOT/grub.cfg
 #Usage: create_unattended_iso.yml
 centos_iso_filename: unattended_centos7.iso
 rocky_iso_filename: unattended_rocky8.iso
+leap_iso_filename: unattended_leap15.iso
 custom_iso_success_msg: "Unattended ISO file created successfully"
 custom_iso_fail_msg: "Unattended ISO file creation failed. Ensure /mnt/iso path is mounted with valid centos minimal ISO file."
-management_station_ip_file: "management_station_ip.txt"
+custom_iso_success_keyword1: "ISO image produced:"
+custom_iso_success_keyword2: "completed successfully"

+ 6 - 1
control_plane/roles/provision_idrac/tasks/deploy_os.yml

@@ -1,4 +1,4 @@
-# Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
+# Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -44,6 +44,11 @@
         unattended_iso_filename: "{{ rocky_iso_filename }}"
       when: provision_os == os_supported_rocky
 
+    - name: Set unattended_iso_filename - leap
+      set_fact:
+        unattended_iso_filename: "{{ leap_iso_filename }}"
+      when: provision_os == os_supported_leap
+
     - name: Install OS using iDRAC
       dellemc.openmanage.idrac_os_deployment:
         idrac_ip: "{{ inventory_hostname }}"

+ 3 - 3
control_plane/roles/provision_idrac/vars/main.yml

@@ -1,4 +1,4 @@
-#  Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
+#  Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -55,7 +55,7 @@ provision_method_pxe: "PXE"
 # Usage: update_firmware.yml
 idrac_port: 443
 idrac_error_message: "Unable to complete the operation because the catalog name entered has either unsupported firmware packages or same version installed on the server"
-firmware_job_fail_msg: "Failed. Error occured while updating firmware"
+firmware_job_fail_msg: "Failed. Error occurred while updating firmware"
 firmware_job_success_msg: "Firmware update job compeleted successfully"
 
 # Usage: import_scp.yml
@@ -71,4 +71,4 @@ file_permission: 0644
 provision_os_msg: "OS provisioning is initiated. Wait for installation to complete for all servers."
 idrac_provisioning_fail_msg: "OS provisioning using iDRAC is failed. This could be due to older firmware or some internal issues with server. Re-run idrac_template after fixing the issue"
 pxe_provisioning_fail_msg: "OS provisioning using PXE is failed. This could be due some internal issues with server. Re-run idrac_template after fixing the issue"
-add_inventory_fail_msg: "Failed. Unable to add provisioned host to provisioned_idrac_inventory."
+add_inventory_fail_msg: "Failed. Unable to add provisioned host to provisioned_idrac_inventory."