diff --git a/tasks/main.yml b/tasks/main.yml index d25f455..5cd7555 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,14 +3,14 @@ when: submodules_versioncheck|bool - name: register os-specific variables - include_vars: default.yml + include_vars: vars/default.yml when: - ansible_distribution != 'Fedora' - ansible_distribution != 'Archlinux' - ansible_distribution != 'CentOS' - name: register os-specific variables - include_vars: "{{ ansible_distribution | lower }}.yml" + include_vars: "vars/{{ ansible_distribution | lower }}.yml" when: - ansible_distribution == 'Fedora' - ansible_distribution == 'Archlinux' diff --git a/templates/sshd_config.j2 b/templates/sshd_config.j2 index 537eced..2c6842b 100644 --- a/templates/sshd_config.j2 +++ b/templates/sshd_config.j2 @@ -98,6 +98,10 @@ PrintMotd no # sftp (required by ansible) # Subsystem sftp /usr/lib/openssh/sftp-server -Subsystem sftp {{ sftp_server }} +{% if ansible_os_family == 'Redhat' %} +Subsystem sftp /usr/libexec/openssh/sftp-server +{% else %} +Subsystem sftp /usr/lib/openssh/sftp-server +{% endif %} # ETC diff --git a/vars/archlinux.yml b/vars/archlinux.yml index 1ccb518..164876b 100644 --- a/vars/archlinux.yml +++ b/vars/archlinux.yml @@ -1,3 +1,2 @@ --- ssh_service: sshd -sftp_server: '/usr/lib/openssh/sftp-server' diff --git a/vars/centos.yml b/vars/centos.yml index dfe45d8..164876b 100644 --- a/vars/centos.yml +++ b/vars/centos.yml @@ -1,3 +1,2 @@ --- ssh_service: sshd -sftp_server: '/usr/libexec/openssh/sftp-server' diff --git a/vars/default.yml b/vars/default.yml index be9fcea..199a5d8 100644 --- a/vars/default.yml +++ b/vars/default.yml @@ -1,3 +1,2 @@ --- ssh_service: ssh -sftp_server: '/usr/lib/openssh/sftp-server' diff --git a/vars/fedora.yml b/vars/fedora.yml index 1ccb518..164876b 100644 --- a/vars/fedora.yml +++ b/vars/fedora.yml @@ -1,3 +1,2 @@ --- ssh_service: sshd -sftp_server: '/usr/lib/openssh/sftp-server' diff --git a/vars/main.yml b/vars/main.yml index f3d4843..9b04aa1 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,3 +1,3 @@ --- -playbook_version_number: 2054 # should be over ninethousand +playbook_version_number: 2056 # should be over ninethousand playbook_version_path: 'role-sshd_chaos-bodensee_github.com.version'