Files
securityonion/salt/idh/openssh/config.sls
m0duspwnens 986cbb129a pkg not file
2024-05-10 12:33:56 -04:00

25 lines
588 B
Plaintext

{% from "idh/openssh/map.jinja" import openssh_map with context %}
include:
- idh.openssh
{% if grains.os_family == 'RedHat' %}
idh_sshd_selinux:
selinux.port_policy_present:
- port: {{ openssh_map.config.port }}
- protocol: tcp
- sel_type: ssh_port_t
- prereq:
- file: openssh_config
- require:
- pkg: python_selinux_mgmt_tools
{% endif %}
openssh_config:
file.replace:
- name: {{ openssh_map.conf }}
- pattern: '(^|^#)Port \d+$'
- repl: 'Port {{ openssh_map.config.port }}'
- watch_in:
- service: {{ openssh_map.service }}