Check runtime directory for running CI in Debian and Ubuntu

This commit is contained in:
Jakub Jelen 2020-11-23 10:00:58 +01:00
parent 51be56b57a
commit 6b36488299
8 changed files with 20 additions and 0 deletions

View file

@ -70,3 +70,7 @@ __sshd_defaults: {}
__sshd_os_supported: no
__sshd_sysconfig_supports_crypto_policy: false
__sshd_sysconfig_supports_use_strong_rng: false
__sshd_runtime_directory: false
__sshd_runtime_directory_mode: "0755"

View file

@ -84,6 +84,16 @@
changed_when: False
when: sshd_test_hostkey.path is defined
- name: Make sure sshd runtime directory is present
file:
path: "{{ __sshd_runtime_directory }}"
state: directory
owner: root
group: root
mode: "{{ __sshd_runtime_directory_mode }}"
when:
- __sshd_runtime_directory | d(false) | bool
- name: Create the configuration file
template:
src: sshd_config.j2

View file

@ -34,3 +34,4 @@ __sshd_defaults:
Subsystem: "sftp {{ sshd_sftp_server }}"
UsePAM: yes
__sshd_os_supported: yes
__sshd_runtime_directory: /run/sshd

View file

@ -32,3 +32,4 @@ __sshd_defaults:
Subsystem: "sftp {{ sshd_sftp_server }}"
UsePAM: yes
__sshd_os_supported: yes
__sshd_runtime_directory: /run/sshd

View file

@ -36,3 +36,4 @@ __sshd_defaults:
Subsystem: "sftp {{ sshd_sftp_server }}"
UsePAM: yes
__sshd_os_supported: yes
__sshd_runtime_directory: /run/sshd

View file

@ -32,3 +32,4 @@ __sshd_defaults:
Subsystem: "sftp {{ sshd_sftp_server }}"
UsePAM: yes
__sshd_os_supported: yes
__sshd_runtime_directory: /run/sshd

View file

@ -13,3 +13,4 @@ __sshd_defaults:
AcceptEnv: LANG LC_*
Subsystem: "sftp {{ sshd_sftp_server }}"
__sshd_os_supported: yes
__sshd_runtime_directory: /run/sshd

View file

@ -12,3 +12,4 @@ __sshd_defaults:
AcceptEnv: LANG LC_*
Subsystem: "sftp /usr/lib/openssh/sftp-server"
__sshd_os_supported: yes
__sshd_runtime_directory: /run/sshd