sshd_config: for checking use template-engine

master
Denis Knauf 2024-01-14 22:50:16 +01:00
parent f7c525f38c
commit c6771d666e
1 changed files with 2 additions and 2 deletions

View File

@ -5,8 +5,8 @@
command: 'sshd -o "include /dev/null"'
register: sshd_include_option_check
failed_when: 'sshd_include_option_check.rc not in [1,255] or sshd_include_option_check.stderr not in ["Include directive not supported as a command-line option", "command-line: line 0: Bad configuration option: include"]'
- set_facts:
sshd_include_option: 'sshd_include_option_check.stderr == "Include directive not supported as a command-line option"'
- set_fact:
sshd_include_option: '{{sshd_include_option_check.stderr == "Include directive not supported as a command-line option"}}'
- when: 'true == sshd_include_option'
block:
- name: '/etc/ssh/sshd_config.d'