mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-25 12:30:19 +01:00
Merge pull request #205 from sscheib/master
This commit is contained in:
commit
2e2e831c4d
3 changed files with 26 additions and 0 deletions
|
@ -40,6 +40,7 @@ Tested on:
|
|||
* FreeBSD 10.1
|
||||
* OpenBSD 6.0
|
||||
* AIX 7.1, 7.2
|
||||
* OpenWrt 21.03
|
||||
|
||||
It will likely work on other flavours and more direct support via suitable
|
||||
[vars/](vars/) files is welcome.
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
- ansible_virtualization_type|default(None) not in __sshd_skip_virt_env
|
||||
- ansible_connection != 'chroot'
|
||||
- ansible_os_family != 'AIX'
|
||||
- ansible_os_family != 'OpenWrt'
|
||||
listen: reload_sshd
|
||||
|
||||
# sshd on AIX cannot be 'reloaded', it must be Stopped+Started.
|
||||
|
@ -29,3 +30,13 @@
|
|||
when:
|
||||
- sshd_allow_reload|bool
|
||||
- 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