Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add support for EL10 #134

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
galaxy_info:
author: Jaroslav Škarvada <jskarvad@redhat.com>
description: Configure Postfix
galaxy_tags: [system, beta]
company: Red Hat, Inc.
license: GPL-3.0+
min_ansible_version: "2.9"
Expand All @@ -16,3 +15,12 @@ galaxy_info:
- "7"
- "8"
- "9"
galaxy_tags:
- beta
- el6
- el7
- el8
- el9
- el10
- fedora
- system
16 changes: 14 additions & 2 deletions tasks/selinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,20 @@
- name: Get the smtp related tcp service ports
shell: |-
set -euo pipefail
firewall-cmd --info-service="{{ item }}" | \
grep -E " +ports: +" | sed -e "s/ *ports: //"
ports="$(firewall-cmd --info-service="{{ item }}" | \
grep -E " +ports: +" | sed -e "s/ *ports: //")" || :
if [ -z "$ports" ]; then
include="$(firewall-cmd --info-service="{{ item }}" | \
awk '/^ +includes:/ {print $2}')" || :
if [ -n "$include" ]; then
ports="$(firewall-cmd --info-service="$include" | \
grep -E " +ports: +" | sed -e "s/ *ports: //")"
fi
fi
if [ -z "$ports" ]; then
exit 1
fi
echo "$ports"
register: __ports
changed_when: false
loop: "{{ __postfix_smtp_services }}"
Expand Down
6 changes: 6 additions & 0 deletions vars/CentOS_10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: GPL-3.0-only
---
__postfix_smtp_services:
- smtp
- smtps
- smtp-submission
6 changes: 6 additions & 0 deletions vars/RedHat_10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: GPL-3.0-only
---
__postfix_smtp_services:
- smtp
- smtps
- smtp-submission
Loading