Skip to content

Commit

Permalink
tests: Fix deprecated_sshd_variable test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakuje committed Oct 24, 2024
1 parent 657e69d commit 583a983
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/tests_deprecated_sshd_variable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@
ansible.builtin.meta: flush_handlers

- name: List effective configuration using sshd -T
ansible.builtin.command: sshd -T
ansible.builtin.shell: |
set -eu
if set -o | grep pipefail 2>&1 /dev/null ; then
set -o pipefail
fi
if test ! -f /etc/ssh/ssh_host_rsa_key; then
ssh-keygen -q -t rsa -f /etc/ssh/ssh_host_rsa_key -C '' -N ''
fi
sshd -T
register: runtime
changed_when: false

Expand Down

0 comments on commit 583a983

Please sign in to comment.