File support-cobbler-2.X-kickstart-profile-data.diff of Package koan
From d94f67fd327af7ec159eb2f86786c95e3492a140 Mon Sep 17 00:00:00 2001
From: Orion Poplawski <orion@nwra.com>
Date: Thu, 17 Oct 2019 16:20:06 -0600
Subject: [PATCH] Support cobbler 2.X "kickstart" profile data
---
koan/app.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Index: koan-2.9.0/koan/app.py
===================================================================
--- koan-2.9.0.orig/koan/app.py
+++ koan-2.9.0/koan/app.py
@@ -632,8 +632,12 @@ class Koan:
# shouldn't end up here, right?
profile_data = {}
- if profile_data.get("autoinst", "") != "":
+ if profile_data.get("autoinst", "") == "":
+ # Fall back to kickstart from cobbler < 3.X
+ if profile_data.get("kickstart", "") != "":
+ profile_data["autoinst"] = profile_data["kickstart"]
+ if "autoinst" in profile_data:
# fix URLs
if profile_data["autoinst"][0] == "/":
if not self.system: