mirror of
https://github.com/roles-ansible/ansible_role_sshd.git
synced 2024-08-16 11:59:49 +02:00
Optionally disable Allow[Users,Groups] options
This commit is contained in:
parent
f03546d93c
commit
6799a8ce25
3 changed files with 7 additions and 0 deletions
3
defaults/main.yml
Normal file
3
defaults/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
# Enable AllowUsers and AllowGroups options
|
||||
restrict_allow_users: True
|
|
@ -7,6 +7,8 @@ Ansible role to configure the OpenSSH `ssh` server.
|
|||
Variables
|
||||
---------
|
||||
|
||||
* `restrict_allow_users`: enable the `AllowUsers` and `AllowGroups` options.
|
||||
|
||||
|
||||
Files
|
||||
-----
|
||||
|
|
|
@ -32,8 +32,10 @@ UsePAM yes
|
|||
|
||||
|
||||
# User Authentication
|
||||
{% if restrict_allow_users|default(True) %}
|
||||
AllowUsers {{ sshd_allow_users|join(' ') }}
|
||||
AllowGroups {{ sshd_allow_groups|join(' ') }}
|
||||
{% endif %}
|
||||
PermitRootLogin without-password
|
||||
|
||||
LoginGraceTime 120
|
||||
|
|
Loading…
Reference in a new issue