Skip to content

Commit

Permalink
Add Kickstart remediation to 'mount' template
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-cerny committed Jul 12, 2024
1 parent 32941d8 commit 5e000a1
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/templates/template_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ The only way to remediate is to recompile and reinstall the kernel, so no remedi

- **min_size** - the minimum recommended partition size, in bytes

- Languages: Anaconda, OVAL, Blueprint
- Languages: Anaconda, OVAL, Blueprint, Kickstart

#### mount_option
- Checks if a given partition is mounted with a specific option such
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ template:
backends:
blueprint: 'off'
anaconda: 'off'
kickstart: 'off'
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ template:
name: mount
vars:
mountpoint: /var/log
min_size: 5368709120
min_size: 1073741824
{{% endif %}}
3 changes: 3 additions & 0 deletions shared/templates/mount/kickstart.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# platform = multi_platform_rhel,multi_platform_fedora

logvol {{{ MOUNTPOINT }}} --fstype=xfs --name={{{ NAME }}} --vgname=VolGroup --size={{{ MIN_SIZE_MB }}}
3 changes: 3 additions & 0 deletions shared/templates/mount/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@

def preprocess(data, lang):
data["pointid"] = ssg.utils.escape_id(data["mountpoint"])
if "min_size" in data and lang == "kickstart":
data["min_size_mb"] = int(int(data["min_size"]) / 1024 / 1024)
data["name"] = data["mountpoint"].replace("/", "")
return data
1 change: 1 addition & 0 deletions shared/templates/mount/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ supported_languages:
- anaconda
- oval
- blueprint
- kickstart

0 comments on commit 5e000a1

Please sign in to comment.