- 'pixelpark-el8-x86_64'
- 'monitoring-noarch'
- 'prometheus-el8-x86_64'
+ snippets:
+ - 'tpl.001.basics.sh'
+ - 'tpl.010.authkeys.sh'
centos-7:
distro: 'CentOS-7.9-x86_64'
description: 'CentOS 7 x86_64'
- '-mysql-community*'
- '-nfs*'
- '-rpcbind'
+ snippets:
+ - 'tpl.001.basics.sh'
+ - 'tpl.010.authkeys.sh'
centos-stream-8:
distro: 'CentOS-Stream-8-x86_64'
description: 'CentOS Stream 8 x86_64'
- '-abrt*'
- '-nfs*'
- '-rpcbind'
+ snippets:
+ - 'tpl.001.basics.sh'
+ - 'tpl.010.authkeys.sh'
oel-7:
distro: 'Oracle-Linux-7.9-x86_64'
description: 'Oracle Enterprise Linux 7 x86_64'
- '-nfs*'
- '-rpcbind'
- '-*uek*'
+ snippets:
+ - 'tpl.001.basics.sh'
+ - 'tpl.010.authkeys.sh'
rocky-8:
distro: 'Rocky-8.6-x86_64'
description: 'Rocky Linux 8 x86_64'
- '-abrt*'
- '-nfs*'
- '-rpcbind'
+ snippets:
+ - 'tpl.001.basics.sh'
+ - 'tpl.010.authkeys.sh'
cobbler-repos:
almalinux-8-x86_64-appstream:
from .xlate import XLATOR
-__version__ = '0.8.4'
+__version__ = '0.8.5'
LOG = logging.getLogger(__name__)
self.local_ks_file = Path(tmp_ks)
LOG.debug(_("Using temporary kickstart file {!r}.").format(tmp_ks))
+ snippet_lst = []
+ for snippet in sorted(self.cfg.current_distro.snippets.values(), key=str.lower):
+ snippet_lst.append(snippet)
+
jinja_env = jinja2.Environment(
loader=jinja2.FileSystemLoader(str(self.base_dir / 'templates')),
autoescape=jinja2.select_autoescape(),
)
ks_template = jinja_env.get_template('el-standard.ks')
- ks_content = ks_template.render(distro=self.cfg.current_distro) + '\n\n'
+ ks_content = ks_template.render(
+ distro=self.cfg.current_distro, snippets=snippet_lst) + '\n\n'
if self.verbose > 1:
LOG.debug(_("Generated kickstart file content:") + '\n' + ks_content)
echo "mac_address_eth0: '$mac_address_eth0'"
echo "System status: '${system_status}'"
+###############################################################################
+# Performing snippets
+
+{%- for snippet in snippets %}
+
+#set $this_snippet= "per_status/" + $SYSTEM_STATUS + "/{{ snippet }}"
+echo
+echo "Using snippet $this_snippet"
+$SNIPPET($this_snippet)
+{%- endfor %}
+
+# ###########################
+# Seems to be finished
+
%end