Skip to content

Commit

Permalink
Replace bogus 'prodtype' with 'product' in Jinja expressions
Browse files Browse the repository at this point in the history
Some rules got it wrong.
  • Loading branch information
evgenyz committed Feb 8, 2024
1 parent 7b923ac commit 5ea8d4c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ description: |-
rationale: |-
These settings configure the firewall to allow connections to an FTP server.
{{% if prodtype != "rhel7" %}}
{{% if product != "rhel7" %}}
The first line allows initial connections to the FTP server port.
FTP is an older protocol which is not very compatible with firewalls. During the initial FTP dialogue, the client
and server negotiate an arbitrary port to be used for data transfer. The <tt>ip_conntrack_ftp</tt> module is used by
Expand Down
4 changes: 2 additions & 2 deletions linux_os/guide/services/ntp/service_ntp_enabled/rule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ template:
vars:
servicename: ntp

{{% if prodtype in ["rhel7", "rhel8", "rhel9", "sle15"] %}}
{{% if product in ["rhel7", "rhel8", "rhel9", "sle15"] %}}
warnings:
- general:
{{% if prodtype == "rhel7" %}}
{{% if product == "rhel7" %}}
The <pre>ntp.service</pre> Systemd unit is not available in {{{
full_name }}}. <pre>ntpd.service</pre> should be used instead together with the respective <pre>service_ntpd_enabled</pre> rule..
{{% else %}}
Expand Down
2 changes: 1 addition & 1 deletion linux_os/guide/services/ntp/service_ntpd_enabled/rule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ template:

platform: package[ntp]

{{% if prodtype in ["rhel8", "rhel9", "sle15"] %}}
{{% if product in ["rhel8", "rhel9", "sle15"] %}}
warnings:
- general:
The <pre>ntp</pre> package is not available in {{{ full_name }}}. Please
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
documentation_complete: true

# applicable only to products that ship OpenSSH<8.2
# prodtypes: ???

title: 'Set SSH Client Alive Count Max to zero'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ template:
pkgname@ubuntu1804: audispd-plugins
pkgname@ubuntu2004: audispd-plugins

{{% if prodtype in ["rhel7", "rhel8", "rhel9"] %}}
{{% if product in ["rhel7", "rhel8", "rhel9"] %}}
warnings:
- general:
This package is not available in {{{ full_name }}}. The correct package
is called <pre>audispd-plugins</pre>. The rule <pre> is suggested as a replacement.
This package is not available in {{{ full_name }}} [{{{ product }}}]. The correct package
is called <pre>audispd-plugins</pre>.
{{% endif %}}
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
documentation_complete: true

# Set prodtypes if needed, otherwise let the rule to be applicable for all products by omitting the prodtype declaration

title: "Don't target root user in the sudoers file"

description: |-
Expand Down

0 comments on commit 5ea8d4c

Please sign in to comment.