ssh_port is used in three places: sshd_config.j2 (Port directive), base/tasks/main.yml (UFW SSH allow, fail2ban jail). It's currently global in all.yml. Ansible uses ansible_port to know which port to connect on.
Goals:
ssh_port + ansible_port)Non-Goals:
ansible_port and ssh_port in inventoryansible_port is Ansible's built-in variable for connection port. ssh_port is our variable used in templates. Both should match. Set them together in the inventory host vars.
Keep the default ssh_port: 22 in group_vars/all.yml so it works if not overridden per-host.
ansible_port and ssh_port don't match, Ansible connects on wrong port. Mitigation: document clearly, could DRY up by setting ssh_port: "{{ ansible_port | default(22) }}" in all.yml.