[jenkins-ci PATCH 02/22] guests, lcitool: Use install_url in the unattended install files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Passing `url --url={{ install_url }}` to a kickstart file is, according
to Red Hat official documentation[0], mandatory for RHEL 8 and onwards
(which includes CentOS 8).

Using it for RHEL 7, CentOS 7, and Fedora does not cause any issue.

[0]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/performing_an_advanced_rhel_installation/kickstart-commands-and-options-reference_installing-rhel-as-an-experienced-user

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 guests/configs/kickstart.cfg |  4 ++++
 guests/lcitool               | 10 ++++++++++
 2 files changed, 14 insertions(+)

diff --git a/guests/configs/kickstart.cfg b/guests/configs/kickstart.cfg
index 713557a..a176e25 100644
--- a/guests/configs/kickstart.cfg
+++ b/guests/configs/kickstart.cfg
@@ -44,6 +44,10 @@ part swap --fstype=swap --size=256
 bootloader --location=mbr --timeout=1
 
 
+# Set the installation url
+url --url={{ install_url }}
+
+
 # Configure networking
 #
 # The only network interface available to the guest will come up
diff --git a/guests/lcitool b/guests/lcitool
index 3985e90..9ef5795 100755
--- a/guests/lcitool
+++ b/guests/lcitool
@@ -539,9 +539,19 @@ class Application:
                 raise Exception(
                     "Host {} doesn't support installation".format(host)
                 )
+
+            unattended_options = [
+                "install_url",
+            ]
+
             initrd_template = os.path.join(base, "configs", install_config)
             with open(initrd_template) as template:
                 content = template.read()
+                for option in unattended_options:
+                    content = content.replace(
+                        "{{ " + option + " }}",
+                        facts[option]
+                    )
 
                 tempdir = tempfile.mkdtemp()
                 initrd_inject = os.path.join(tempdir, install_config)
-- 
2.23.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux