Blame SOURCES/sshd-example.diff
|
|
7bd08a |
diff --git a/README.md b/README.md
|
|
|
7bd08a |
index 676ad72..dc06d85 100644
|
|
|
7bd08a |
--- a/README.md
|
|
|
7bd08a |
+++ b/README.md
|
|
|
7bd08a |
@@ -190,7 +190,7 @@ defaults. This is useful if the role is used in deployment stage to make sure
|
|
|
7bd08a |
the service is able to start on the first attempt. To disable this check, set
|
|
|
7bd08a |
this to empty list.
|
|
|
7bd08a |
|
|
|
7bd08a |
-* `sshd_hostkey_owner`, `sshd_hostkey_group`, `sshd_hostkey_group`
|
|
|
7bd08a |
+* `sshd_hostkey_owner`, `sshd_hostkey_group`, `sshd_hostkey_mode`
|
|
|
7bd08a |
|
|
|
7bd08a |
Use these variables to set the ownership and permissions for the host keys from
|
|
|
7bd08a |
the above list.
|
|
|
7bd08a |
@@ -273,6 +273,8 @@ for example:
|
|
|
7bd08a |
X11Forwarding: yes
|
|
|
7bd08a |
```
|
|
|
7bd08a |
|
|
|
7bd08a |
+More example playbooks can be found in [`examples/`](examples/) directory.
|
|
|
7bd08a |
+
|
|
|
7bd08a |
Template Generation
|
|
|
7bd08a |
-------------------
|
|
|
7bd08a |
|
|
|
7bd08a |
diff --git a/examples/example-root-login.yml b/examples/example-root-login.yml
|
|
|
7bd08a |
new file mode 100644
|
|
|
7bd08a |
index 0000000..156e629
|
|
|
7bd08a |
--- /dev/null
|
|
|
7bd08a |
+++ b/examples/example-root-login.yml
|
|
|
7bd08a |
@@ -0,0 +1,15 @@
|
|
|
7bd08a |
+---
|
|
|
7bd08a |
+- hosts: all
|
|
|
7bd08a |
+ tasks:
|
|
|
7bd08a |
+ - name: Configure sshd to prevent root and password login except from particular subnet
|
|
|
7bd08a |
+ include_role:
|
|
|
7bd08a |
+ name: ansible-sshd
|
|
|
7bd08a |
+ vars:
|
|
|
7bd08a |
+ sshd:
|
|
|
7bd08a |
+ # root login and password login is enabled only from a particular subnet
|
|
|
7bd08a |
+ PermitRootLogin: no
|
|
|
7bd08a |
+ PasswordAuthentication: no
|
|
|
7bd08a |
+ Match:
|
|
|
7bd08a |
+ - Condition: "Address 192.0.2.0/24"
|
|
|
7bd08a |
+ PermitRootLogin: yes
|
|
|
7bd08a |
+ PasswordAuthentication: yes
|