From 4a11070e2cdd3fdfe7ce2cc8600fac0e508ddd54 Mon Sep 17 00:00:00 2001 From: Nuno Godinho Date: Mon, 13 Jul 2020 16:26:01 +0100 Subject: [PATCH] README: New section on server port and idempotency Add section called "Changing the default port and idempotency" and reference to role ssh-hardening-fallback, a wrapper around this role which implements a fallback to port 22 when the configured port is unreachable. Signed-off-by: Nuno Godinho --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 247a9bd..def0e65 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,12 @@ Example playbook: - "AcceptEnv LANG" ``` +## Changing the default port and idempotency + +This role uses the default port 22 or the port configured in the inventory to connect to the server. If the default `ssh` port is changed via `ssh_server_ports`, once the ssh server is restarted, it will still try to connect using the previous port. In order to run this role again on the same server the inventory will have to be updated to use the new ssh port. + +If idempotency is important, please consider using role [`ssh-hardening-fallback`](https://github.com/nununo/ansible-ssh-hardening-fallback), which is a wrapper around this role that falls back to port 22 if the configured port is unreachable. + ## Example Playbook - hosts: localhost