Fix SSH port logic again

This commit is contained in:
Sam A. 2022-11-13 22:03:45 +01:00 committed by Gitea
parent b310e191f8
commit 1744cf7585

View file

@ -3,6 +3,7 @@
wait_for: wait_for:
port: 19022 port: 19022
host: "{{ ansible_host }}" host: "{{ ansible_host }}"
search_regex: "OpenSSH"
connect_timeout: 5 connect_timeout: 5
timeout: 10 timeout: 10
become: false become: false
@ -20,7 +21,7 @@
ssh_configured.state != "started")) and ssh_configured.state != "started")) and
ansible_port != 2222 ansible_port != 2222
- name: Change SSH port - name: Change SSH port on host
lineinfile: lineinfile:
dest: "/etc/ssh/sshd_config" dest: "/etc/ssh/sshd_config"
regexp: "^#?Port" regexp: "^#?Port"