@ -9,13 +9,13 @@
- name : test login
- name : test login
expect:
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:
responses:
(?i)password : "pass123"
(?i)password : "pass123"
- name : test login with invalid password (should fail)
- name : test login with invalid password (should fail)
expect:
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:
responses:
(?i)password : "badpass"
(?i)password : "badpass"
ignore_errors : yes
ignore_errors : yes
@ -35,7 +35,7 @@
- name : test login with private key
- name : test login with private key
expect:
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:
responses:
(?i)password : 'pass123'
(?i)password : 'pass123'
@ -47,7 +47,7 @@
- name : test login with private key (should fail, no user)
- name : test login with private key (should fail, no user)
expect:
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:
responses:
(?i)password : 'pass123'
(?i)password : 'pass123'
ignore_errors : yes
ignore_errors : yes
@ -62,7 +62,7 @@
- name : test login with private key
- name : test login with private key
expect:
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:
responses:
(?i)password : 'pass123'
(?i)password : 'pass123'
ignore_errors : yes
ignore_errors : yes
@ -77,7 +77,7 @@
# FIXME: pexpect fails with OSError: [Errno 5] Input/output error
# FIXME: pexpect fails with OSError: [Errno 5] Input/output error
- name : test login with invalid private key (should fail)
- name : test login with invalid private key (should fail)
expect:
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:
responses:
(?i)password : "pass123"
(?i)password : "pass123"
ignore_errors : yes
ignore_errors : yes