diff --git a/sshd_config/handlers/main.yml b/sshd_config/handlers/main.yml index 67979564..3b64a782 100644 --- a/sshd_config/handlers/main.yml +++ b/sshd_config/handlers/main.yml @@ -1,3 +1,9 @@ --- - name: Reload the ssh service service: name=ssh state=reloaded + when: ansible_distribution_file_variety == 'Debian' + +- name: Reload the ssh service + service: name=sshd state=reloaded + when: ansible_distribution_file_variety == 'RedHat' + diff --git a/sshd_config/templates/sshd_config.j2 b/sshd_config/templates/sshd_config.j2 index dd656685..098b02ee 100644 --- a/sshd_config/templates/sshd_config.j2 +++ b/sshd_config/templates/sshd_config.j2 @@ -96,7 +96,11 @@ AcceptEnv LANG LC_* UsePAM {{ sshd_use_pam }} {% if sshd_enable_sftp_subsystem %} +{% if ansible_distribution_file_variety == 'RedHat' %} +Subsystem sftp /usr/libexec/openssh/sftp-server +{% else %} Subsystem sftp /usr/lib/openssh/sftp-server +{% endif %} {% if sshd_enable_sftp_jail %} Match Group {{ sshd_sftp_chroot_match_group }} ChrootDirectory {{ sshd_sftp_chroot_directory }}