Skip to content

Commit

Permalink
use localhost if no SSH_CONNECTION env. var.
Browse files Browse the repository at this point in the history
use `127.0.0.1` for kdump_test_ssh_source if the `SSH_CONNECTION`
env. var. is not defined - this is primarily for testing on a
single host (i.e. the control node is the managed node) for the
basic smoke test.
  • Loading branch information
richm committed Jun 8, 2021
1 parent 8243bd4 commit e0d693e
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 e0d693e

Please sign in to comment.