Skip to content

Commit

Permalink
Merge pull request #83 from richm/fix-ssh-test-localhost
Browse files Browse the repository at this point in the history
use localhost if no SSH_CONNECTION env. var.
  • Loading branch information
richm authored Jun 9, 2021
2 parents 8243bd4 + e0d693e commit 02fc72b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/tests_ssh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
# but is less realistic, as in practice a host can not dump core
# to itself.
kdump_test_ssh_server_outside: "{{ inventory_hostname }}"
kdump_test_ssh_source: "{{ ansible_env['SSH_CONNECTION'].split()[0] }}"
kdump_test_ssh_source: "{{
ansible_env['SSH_CONNECTION'].split()[0]
if 'SSH_CONNECTION' in ansible_env
else '127.0.0.1'
}}"

# this is the address at which the ssh dump server can be reached
# from the managed host. Dumps will be uploaded there.
Expand Down

0 comments on commit 02fc72b

Please sign in to comment.