Compare commits

...

3 commits

Author SHA1 Message Date
t3chn0m4g3
3232781a6d fix var expansion 2025-07-04 17:29:19 +02:00
natitomattis
1c259e8b10
Adjust restore procedure on upgrade.sh (#1777)
* small fix on upgrade.sh
* typo
2025-07-04 17:17:49 +02:00
dz
8e79c596f3
Comment out Port(s) in sshd_config to avoid port conflicts when multiple SSH Port definitions present (#1809)
- Comment out Port(s) in sshd_config to avoid port conflicts when multiple SSH Port definitions present
- Resolve duplication issue for repeatedly running the install playbook
- Avoid accidental uncommenting of Port 22
2025-07-04 16:57:00 +02:00
3 changed files with 34 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -188,6 +188,10 @@ function fuRESTORE () {
fi
echo "### Restoring T-Pot config file .env"
tar xvf $myARCHIVE .env -C $HOME/tpotce >/dev/null 2>&1
# Backup file (.env) contains a record of the TPOT_VERSION that is used in docker-compose commmands.
# We should upgrade the version in this file after restoring the backup.
newVERSION=$(cat version)
sed -i "s/^TPOT_VERSION=.*/TPOT_VERSION=${newVERSION}/" $HOME/tpotce/.env
}
################