mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-25 20:40:18 +01:00
examples: Provide simple example playbook
This commit is contained in:
parent
30ac352a24
commit
c6f1b3b9ea
1 changed files with 15 additions and 0 deletions
15
examples/example-root-login.yml
Normal file
15
examples/example-root-login.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Configure sshd to prevent root and password login except from particular subnet
|
||||
include_role:
|
||||
name: ansible-sshd
|
||||
vars:
|
||||
sshd:
|
||||
# root login and password login is enabled only from a particular subnet
|
||||
PermitRootLogin: no
|
||||
PasswordAuthentication: no
|
||||
Match:
|
||||
- Condition: "Address 192.0.2.0/24"
|
||||
PermitRootLogin: yes
|
||||
PasswordAuthentication: yes
|
Loading…
Reference in a new issue