|
@@ -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");
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# you may not use this file except in compliance with the License.
|
|
@@ -17,7 +17,7 @@
|
|
block:
|
|
block:
|
|
- name: Create custom ISO
|
|
- name: Create custom ISO
|
|
command: >-
|
|
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 }}
|
|
-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
|
|
changed_when: true
|
|
register: centos_iso_status
|
|
register: centos_iso_status
|
|
@@ -28,18 +28,10 @@
|
|
- name: Custom ISO creation status check
|
|
- name: Custom ISO creation status check
|
|
assert:
|
|
assert:
|
|
that:
|
|
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 }}"
|
|
success_msg: "{{ custom_iso_success_msg }}"
|
|
fail_msg: "{{ custom_iso_fail_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
|
|
tags: install
|
|
when: provision_os == os_supported_centos
|
|
when: provision_os == os_supported_centos
|
|
|
|
|
|
@@ -47,7 +39,7 @@
|
|
block:
|
|
block:
|
|
- name: Create custom ISO
|
|
- name: Create custom ISO
|
|
command: >-
|
|
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 }}
|
|
-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
|
|
changed_when: true
|
|
register: rocky_iso_status
|
|
register: rocky_iso_status
|
|
@@ -58,23 +50,37 @@
|
|
- name: Custom ISO creation status check
|
|
- name: Custom ISO creation status check
|
|
assert:
|
|
assert:
|
|
that:
|
|
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 }}"
|
|
success_msg: "{{ custom_iso_success_msg }}"
|
|
fail_msg: "{{ custom_iso_fail_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
|
|
tags: install
|
|
when: provision_os == os_supported_rocky
|
|
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
|
|
- name: Remove the kickstart file
|
|
file:
|
|
file:
|
|
path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
|
|
path: "{{ role_path }}/files/{{ idrac_kickstart_file }}"
|
|
state: absent
|
|
state: absent
|
|
- tags: install
|
|
|
|
|
|
+ tags: install
|