fix(cis): add pipefail to sshd version detection and define binary defaults

This commit is contained in:
sandwich committed 2026-02-20 22:24:14 +01:00
1 parent 1634af552e
commit e0687269d4
2 files changed
+7 -1

No files matched your search

+3 -1
View File
@@ -32,7 +32,9 @@
- name: Detect target OpenSSH version
ansible.builtin.shell: >-
{{ chroot_command }} ssh -V 2>&1 | grep -oP 'OpenSSH_\K[0-9]+\.[0-9]+'
set -o pipefail && {{ chroot_command }} ssh -V 2>&1 | grep -oP 'OpenSSH_\K[0-9]+\.[0-9]+'
args:
executable: /bin/bash
register: cis_sshd_openssh_version
changed_when: false
failed_when: false