Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.

Commit 9ac1589

Browse files
Add condition to allow mongodb port in selinux only in redhat distribution
1 parent 6a133b5 commit 9ac1589

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tasks/configure.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@
9999
proto: tcp
100100
setype: mongod_port_t
101101
state: present
102-
when: mongodb_net_port not in [ "27017", "27018", "27019" ]
102+
when:
103+
- mongodb_net_port not in [ "27017", "27018", "27019" ]
104+
- ansible_distribution | lower == "redhat" or ansible_distribution | lower == "amazon"
103105

104106
- name: Configure mongorc.js
105107
template:

0 commit comments

Comments
 (0)