aa1eab6
From 4b5025e9e30db30d6e264fabeb860a7758d7d7ad Mon Sep 17 00:00:00 2001
aa1eab6
From: Orion Poplawski <orion@nwra.com>
aa1eab6
Date: Mon, 8 Mar 2021 22:04:52 -0700
aa1eab6
Subject: [PATCH] autoinstall_templates are installed into
aa1eab6
 /var/lib/cobbler/templates
aa1eab6
aa1eab6
---
aa1eab6
 cobbler/actions/sync.py      | 2 +-
aa1eab6
 config/cobbler/settings.yaml | 4 ++--
aa1eab6
 docs/cobbler-conf.rst        | 4 ++--
aa1eab6
 tests/test_data/settings_old | 4 ++--
aa1eab6
 4 files changed, 7 insertions(+), 7 deletions(-)
aa1eab6
aa1eab6
diff --git a/cobbler/actions/sync.py b/cobbler/actions/sync.py
aa1eab6
index 2667edb56..302c81de7 100644
aa1eab6
--- a/cobbler/actions/sync.py
aa1eab6
+++ b/cobbler/actions/sync.py
aa1eab6
@@ -179,7 +179,7 @@ def clean_trees(self):
aa1eab6
                 if x not in self.settings.webdir_whitelist:
aa1eab6
                     # delete directories that shouldn't exist
aa1eab6
                     utils.rmtree(path, logger=self.logger)
aa1eab6
-                if x in ["autoinstall_templates", "autoinstall_templates_sys", "images", "systems", "distros", "profiles", "repo_profile", "repo_system", "rendered"]:
aa1eab6
+                if x in ["templates", "images", "systems", "distros", "profiles", "repo_profile", "repo_system", "rendered"]:
aa1eab6
                     # clean out directory contents
aa1eab6
                     utils.rmtree_contents(path, logger=self.logger)
aa1eab6
         #
aa1eab6
diff --git a/config/cobbler/settings.yaml b/config/cobbler/settings.yaml
aa1eab6
index b2e05a7bf..ac8edccbf 100644
aa1eab6
--- a/config/cobbler/settings.yaml
aa1eab6
+++ b/config/cobbler/settings.yaml
aa1eab6
@@ -77,7 +77,7 @@ cheetah_import_whitelist:
aa1eab6
 createrepo_flags: "-c cache -s sha"
aa1eab6
 
aa1eab6
 # if no autoinstall template is specified to profile add, use this template
aa1eab6
-default_autoinstall: /var/lib/cobbler/autoinstall_templates/default.ks
aa1eab6
+default_autoinstall: /var/lib/cobbler/templates/default.ks
aa1eab6
 
aa1eab6
 # configure all installed systems to use these nameservers by default
aa1eab6
 # unless defined differently in the profile.  For DHCP configurations
aa1eab6
@@ -92,7 +92,7 @@ default_ownership:
aa1eab6
  - "admin"
aa1eab6
 
aa1eab6
 # Cobbler has various sample automatic installation templates stored
aa1eab6
-# in /var/lib/cobbler/autoinstall_templates/.  This controls
aa1eab6
+# in /var/lib/cobbler/templates/.  This controls
aa1eab6
 # what install (root) password is set up for those
aa1eab6
 # systems that reference this variable.  The factory
aa1eab6
 # default is "cobbler" and Cobbler check will warn if
aa1eab6
diff --git a/docs/cobbler-conf.rst b/docs/cobbler-conf.rst
aa1eab6
index 52621e278..ef65acc0b 100644
aa1eab6
--- a/docs/cobbler-conf.rst
aa1eab6
+++ b/docs/cobbler-conf.rst
aa1eab6
@@ -257,7 +257,7 @@ default_autoinstall
aa1eab6
 
aa1eab6
 If no autoinstall template is specified to profile add, use this template.
aa1eab6
 
aa1eab6
-default: ``/var/lib/cobbler/autoinstall_templates/default.ks``
aa1eab6
+default: ``/var/lib/cobbler/templates/default.ks``
aa1eab6
 
aa1eab6
 default_name_*
aa1eab6
 ==============
aa1eab6
@@ -284,7 +284,7 @@ default:
aa1eab6
 default_password_crypted
aa1eab6
 ========================
aa1eab6
 
aa1eab6
-Cobbler has various sample automatic installation templates stored in ``/var/lib/cobbler/autoinstall_templates/``. This
aa1eab6
+Cobbler has various sample automatic installation templates stored in ``/var/lib/cobbler/templates/``. This
aa1eab6
 controls what install (root) password is set up for those systems that reference this variable. The factory default is
aa1eab6
 "cobbler" and Cobbler check will warn if this is not changed. The simplest way to change the password is to run
aa1eab6
 ``openssl passwd -1`` and put the output between the ``""``.
aa1eab6
diff --git a/tests/test_data/settings_old b/tests/test_data/settings_old
aa1eab6
index acbe8cdc9..1b531d21d 100644
aa1eab6
--- a/tests/test_data/settings_old
aa1eab6
+++ b/tests/test_data/settings_old
aa1eab6
@@ -92,7 +92,7 @@ cheetah_import_whitelist:
aa1eab6
 createrepo_flags: "-c cache -s sha"
aa1eab6
 
aa1eab6
 # if no autoinstall template is specified to profile add, use this template
aa1eab6
-default_autoinstall: /var/lib/cobbler/autoinstall_templates/default.ks
aa1eab6
+default_autoinstall: /var/lib/cobbler/templates/default.ks
aa1eab6
 
aa1eab6
 # configure all installed systems to use these nameservers by default
aa1eab6
 # unless defined differently in the profile.  For DHCP configurations
aa1eab6
@@ -107,7 +107,7 @@ default_ownership:
aa1eab6
  - "admin"
aa1eab6
 
aa1eab6
 # cobbler has various sample automatic installation templates stored
aa1eab6
-# in /var/lib/cobbler/autoinstall_templates/.  This controls
aa1eab6
+# in /var/lib/cobbler/templates/.  This controls
aa1eab6
 # what install (root) password is set up for those
aa1eab6
 # systems that reference this variable.  The factory
aa1eab6
 # default is "cobbler" and cobbler check will warn if