diff --git a/installer/install/tpot.yml b/installer/install/tpot.yml index e4de97a4..b6fb16e8 100644 --- a/installer/install/tpot.yml +++ b/installer/install/tpot.yml @@ -478,6 +478,21 @@ tags: - "Ubuntu" + - name: Comment out Port(s) in sshd_config, can cause port conflicts on deploy (AlmaLinux, Debian, Fedora, openSUSE Tumbleweed, Raspbian, Rocky, Ubuntu) + ansible.builtin.replace: + path: /etc/ssh/sshd_config + regexp: '^(Port (?!64295$)[0-9]+)' + replace: '# \1' + when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"] + tags: + - "AlmaLinux" + - "Debian" + - "Fedora" + - "openSUSE Tumbleweed" + - "Raspbian" + - "Rocky" + - "Ubuntu" + - name: Change SSH Port to 64295 (AlmaLinux, Debian, Fedora, Raspbian, Rocky, Ubuntu) lineinfile: path: /etc/ssh/sshd_config diff --git a/installer/remove/tpot.yml b/installer/remove/tpot.yml index 6196f31a..eb89ae86 100644 --- a/installer/remove/tpot.yml +++ b/installer/remove/tpot.yml @@ -215,6 +215,21 @@ - "Rocky" - "Ubuntu" + - name: Revert Comment out Port(s) in sshd_config, can cause port conflicts on deploy (AlmaLinux, Debian, Fedora, openSUSE Tumbleweed, Raspbian, Rocky, Ubuntu) + ansible.builtin.replace: + path: /etc/ssh/sshd_config + regexp: '^# (Port (?!22$)[0-9]+)' + replace: '\1' + when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"] + tags: + - "AlmaLinux" + - "Debian" + - "Fedora" + - "openSUSE Tumbleweed" + - "Raspbian" + - "Rocky" + - "Ubuntu" + - name: Remove vm.max_map_count setting (All) lineinfile: path: /etc/sysctl.conf