Give GitLab SSH port 22 and use 2309 for SSH access
This commit is contained in:
+1
-1
@@ -1,2 +1,2 @@
|
||||
[misc]
|
||||
h2954114.stratoserver.net
|
||||
pbrinkmeier.de
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# All tasks for misc, use this to check whether everything is deployed.
|
||||
---
|
||||
- name: Set up basic packages, Docker, Nix, sshd
|
||||
import_playbook: misc-setup.yaml
|
||||
- name: Deploy Docker configuration
|
||||
import_playbook: misc-docker.yaml
|
||||
- name: Check out static websites from git
|
||||
import_playbook: misc-sites.yaml
|
||||
@@ -30,3 +30,23 @@
|
||||
- docker
|
||||
- docker-compose
|
||||
- requests
|
||||
- name: Configure sshd
|
||||
register: sshdconfig
|
||||
become: yes
|
||||
copy:
|
||||
dest: /etc/ssh/sshd_config.d/00_pbri.conf
|
||||
mode: u=rw,g=r,o=r
|
||||
# Included by /etc/ssh/sshd_config before other configuration
|
||||
content: |
|
||||
Port 2309
|
||||
PermitRootLogin no
|
||||
PubkeyAuthentication yes
|
||||
AuthorizedKeysFile .ssh/authorized_keys
|
||||
PasswordAuthentication no
|
||||
validate: /usr/sbin/sshd -T -f %s
|
||||
- name: Restart sshd
|
||||
when: sshdconfig.changed
|
||||
become: yes
|
||||
service:
|
||||
name: sshd
|
||||
state: restarted
|
||||
Reference in New Issue
Block a user