Skip to content

Commit

Permalink
use nfs_port_t as the built-in
Browse files Browse the repository at this point in the history
  • Loading branch information
richm committed Aug 27, 2022
1 parent 291004b commit 9160652
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/tests_port.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- { ports: '22100', proto: 'tcp', setype: 'ssh_port_t',
state: 'present' }
- { ports: 22101, setype: 'http_port_t' }
- { ports: '20514', proto: 'tcp', setype: 'syslogd_port_t',
- { ports: '2049', proto: 'tcp', setype: 'nfs_port_t',
state: 'present' }

- name: include test variables
Expand All @@ -38,7 +38,7 @@
- { ports: '22022', proto: 'tcp', setype: 'ssh_port_t',
state: 'present' }
- { ports: 22102, setype: 'http_port_t' }
- { ports: '20514', proto: 'tcp', setype: 'syslogd_port_t',
- { ports: '2049', proto: 'tcp', setype: 'nfs_port_t',
state: 'present' }

- name: include test variables
Expand Down Expand Up @@ -81,7 +81,7 @@
name: linux-system-roles.selinux
vars:
selinux_ports:
- { ports: 20514, setype: 'syslogd_port_t',
- { ports: 2049, setype: 'nfs_port_t',
state: 'absent' }
- { ports: '22022', proto: 'tcp', setype: 'ssh_port_t',
state: 'absent' }
Expand All @@ -96,14 +96,14 @@
that: ansible_failed_result.results | selectattr('msg', 'defined') |
map(attribute='msg') | select('search', __pat) | list | length > 0
vars:
__pat: Port tcp/20514 is defined in policy, cannot be deleted
__pat: Port tcp/2049 is defined in policy, cannot be deleted

- name: Ignore errors when removing built-in policy
include_role:
name: linux-system-roles.selinux
vars:
selinux_ports:
- { ports: 20514, setype: 'syslogd_port_t',
- { ports: 2049, setype: 'nfs_port_t',
state: 'absent' }
- { ports: '22022', proto: 'tcp', setype: 'ssh_port_t',
state: 'absent' }
Expand Down

0 comments on commit 9160652

Please sign in to comment.