@ -9,13 +9,13 @@
- name : test login
expect:
command : "ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version"
command : "ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port |default(22) }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version"
responses:
(?i)password : "pass123"
- name : test login with invalid password (should fail)
expect:
command : "ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version"
command : "ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port |default(22) }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version"
responses:
(?i)password : "badpass"
ignore_errors : yes
@ -35,7 +35,7 @@
- name : test login with private key
expect:
command : "ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {{ role_path }}/files/private show version"
command : "ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port |default(22) }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {{ role_path }}/files/private show version"
responses:
(?i)password : 'pass123'
@ -47,7 +47,7 @@
- name : test login with private key (should fail, no user)
expect:
command : "ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {{ role_path }}/files/private show version"
command : "ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port |default(22) }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {{ role_path }}/files/private show version"
responses:
(?i)password : 'pass123'
ignore_errors : yes
@ -62,7 +62,7 @@
- name : test login with private key
expect:
command : "ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {{ role_path }}/files/private show version"
command : "ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port |default(22) }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {{ role_path }}/files/private show version"
responses:
(?i)password : 'pass123'
ignore_errors : yes
@ -77,7 +77,7 @@
# FIXME: pexpect fails with OSError: [Errno 5] Input/output error
- name : test login with invalid private key (should fail)
expect:
command : "ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {{ role_path }}/files/private show version"
command : "ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port |default(22) }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {{ role_path }}/files/private show version"
responses:
(?i)password : "pass123"
ignore_errors : yes