aboutsummaryrefslogtreecommitdiffstats
path: root/roles/sshd
diff options
context:
space:
mode:
Diffstat (limited to 'roles/sshd')
-rw-r--r--roles/sshd/tasks/main.yml2
-rw-r--r--roles/sshd/templates/sshd_config.j23
2 files changed, 4 insertions, 1 deletions
diff --git a/roles/sshd/tasks/main.yml b/roles/sshd/tasks/main.yml
index 54ef9c2..f1af386 100644
--- a/roles/sshd/tasks/main.yml
+++ b/roles/sshd/tasks/main.yml
@@ -17,6 +17,6 @@
- name: check ssh connection
wait_for:
- port: 22
+ port: "{{ ansible_port }}"
delay: 1
state: started
diff --git a/roles/sshd/templates/sshd_config.j2 b/roles/sshd/templates/sshd_config.j2
index 534ea39..f40e160 100644
--- a/roles/sshd/templates/sshd_config.j2
+++ b/roles/sshd/templates/sshd_config.j2
@@ -1,5 +1,8 @@
# managed by Ansible
+# network
+Port {{ ansible_port }}
+
# security
PermitRootLogin yes
MaxAuthTries 6
remember that computers suck.