- name: Use default credentials for ssh
set_fact:
ansible_user: "{{ admin_username }}"
- name: Attempt ssh connection
become: no
raw: "echo Pong!"
ignore_unreachable: true
changed_when: false
register: ssh_result_default
- name: Use fallback port for ssh
ansible_ssh_port: 22
when:
- ssh_result_default is unreachable
register: ssh_result_port
- name: Use fallback port and default Arch Linux ARM credentials for ssh
ansible_ssh_port: "22"
ansible_user: "alarm"
ansible_ssh_password: "alarm"
- ssh_result_port is unreachable