mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-28 21:50:18 +01:00
- Adding support for OpenWrt 21.03
This commit is contained in:
parent
2da40a9e66
commit
6819be90d3
3 changed files with 26 additions and 0 deletions
|
@ -40,6 +40,7 @@ Tested on:
|
||||||
* FreeBSD 10.1
|
* FreeBSD 10.1
|
||||||
* OpenBSD 6.0
|
* OpenBSD 6.0
|
||||||
* AIX 7.1, 7.2
|
* AIX 7.1, 7.2
|
||||||
|
* OpenWrt 21.03
|
||||||
|
|
||||||
It will likely work on other flavours and more direct support via suitable
|
It will likely work on other flavours and more direct support via suitable
|
||||||
[vars/](vars/) files is welcome.
|
[vars/](vars/) files is welcome.
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
- ansible_virtualization_type|default(None) not in __sshd_skip_virt_env
|
- ansible_virtualization_type|default(None) not in __sshd_skip_virt_env
|
||||||
- ansible_connection != 'chroot'
|
- ansible_connection != 'chroot'
|
||||||
- ansible_os_family != 'AIX'
|
- ansible_os_family != 'AIX'
|
||||||
|
- ansible_os_family != 'OpenWrt'
|
||||||
listen: reload_sshd
|
listen: reload_sshd
|
||||||
|
|
||||||
# sshd on AIX cannot be 'reloaded', it must be Stopped+Started.
|
# sshd on AIX cannot be 'reloaded', it must be Stopped+Started.
|
||||||
|
@ -29,3 +30,13 @@
|
||||||
when:
|
when:
|
||||||
- sshd_allow_reload|bool
|
- sshd_allow_reload|bool
|
||||||
- ansible_os_family == 'AIX'
|
- ansible_os_family == 'AIX'
|
||||||
|
|
||||||
|
# sshd on OpenWrt does not support reloading a service, it has to be restarted instead
|
||||||
|
- name: Reload the SSH service (OpenWrt)
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: "{{ sshd_service }}"
|
||||||
|
state: restarted
|
||||||
|
when:
|
||||||
|
- sshd_allow_reload|bool
|
||||||
|
- ansible_os_family == 'OpenWrt'
|
||||||
|
listen: reload_sshd
|
||||||
|
|
14
vars/OpenWrt.yml
Normal file
14
vars/OpenWrt.yml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
__sshd_service: sshd
|
||||||
|
__sshd_packages:
|
||||||
|
- openssh-server
|
||||||
|
- openssh-sftp-server
|
||||||
|
__sshd_config_mode: "0644"
|
||||||
|
__sshd_sftp_server: "/usr/lib/sftp-server"
|
||||||
|
__sshd_defaults:
|
||||||
|
Subsystem: "sftp {{ __sshd_sftp_server }}"
|
||||||
|
AuthorizedKeysFile: .ssh/authorized_keys
|
||||||
|
HostKey:
|
||||||
|
- /etc/ssh/ssh_host_rsa_key
|
||||||
|
- /etc/ssh/ssh_host_ed25519_key
|
||||||
|
__sshd_os_supported: yes
|
Loading…
Reference in a new issue