mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-10-13 20:09:13 +00:00
Comment out Port(s) in sshd_config, can cause port conflicts on deploy
This commit is contained in:
parent
afecbdb6a1
commit
322b025371
2 changed files with 15 additions and 1 deletions
|
@ -481,7 +481,7 @@
|
||||||
- name: Comment out Port(s) in sshd_config, can cause port conflicts on deploy (AlmaLinux, Debian, Fedora, Raspbian, Rocky, Ubuntu)
|
- name: Comment out Port(s) in sshd_config, can cause port conflicts on deploy (AlmaLinux, Debian, Fedora, Raspbian, Rocky, Ubuntu)
|
||||||
ansible.builtin.replace:
|
ansible.builtin.replace:
|
||||||
path: /etc/ssh/sshd_config
|
path: /etc/ssh/sshd_config
|
||||||
regexp: "(^Port [0-9]+)"
|
regexp: "^(Port [0-9]+)"
|
||||||
replace: '# \1'
|
replace: '# \1'
|
||||||
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "Raspbian", "Rocky", "Ubuntu"]
|
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "Raspbian", "Rocky", "Ubuntu"]
|
||||||
tags:
|
tags:
|
||||||
|
|
|
@ -215,6 +215,20 @@
|
||||||
- "Rocky"
|
- "Rocky"
|
||||||
- "Ubuntu"
|
- "Ubuntu"
|
||||||
|
|
||||||
|
- name: Revert Comment out Port(s) in sshd_config, can cause port conflicts on deploy (AlmaLinux, Debian, Fedora, Raspbian, Rocky, Ubuntu)
|
||||||
|
ansible.builtin.replace:
|
||||||
|
path: /etc/ssh/sshd_config
|
||||||
|
regexp: "^# (Port [0-9]+)"
|
||||||
|
replace: '\1'
|
||||||
|
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "Raspbian", "Rocky", "Ubuntu"]
|
||||||
|
tags:
|
||||||
|
- "AlmaLinux"
|
||||||
|
- "Debian"
|
||||||
|
- "Fedora"
|
||||||
|
- "Raspbian"
|
||||||
|
- "Rocky"
|
||||||
|
- "Ubuntu"
|
||||||
|
|
||||||
- name: Remove vm.max_map_count setting (All)
|
- name: Remove vm.max_map_count setting (All)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/sysctl.conf
|
path: /etc/sysctl.conf
|
||||||
|
|
Loading…
Reference in a new issue