add freebsd support, fix template
This commit is contained in:
parent
0df06810fc
commit
6e5f0d0726
3 changed files with 5 additions and 9 deletions
|
|
@ -19,7 +19,7 @@
|
|||
path: "{{ rootpath }}/root/.ssh"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
group: "{{root_group}}"
|
||||
mode: 0700
|
||||
|
||||
- name: write authorized_keys file for user root
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
src: ssh_root_authorized_keys.j2
|
||||
dest: "{{ rootpath }}/root/.ssh/authorized_keys"
|
||||
owner: root
|
||||
group: root
|
||||
group: "{{root_group}}"
|
||||
mode: 0600
|
||||
|
||||
- name: create ssh host keys
|
||||
|
|
|
|||
|
|
@ -32,13 +32,8 @@ AuthenticationMethods publickey
|
|||
# LogLevel VERBOSE logs user's key fingerprint on login. Needed to have a clear audit track of which key was using to log in.
|
||||
LogLevel VERBOSE
|
||||
|
||||
# Root login should not be allowed for auditing reasons. This is because it's difficult to track which process belongs to which root user:
|
||||
#
|
||||
# On Linux, user sessions are tracking using a kernel-side session id, however, this session id is not recorded by OpenSSH.
|
||||
# Additionally, only tools such as systemd and auditd record the process session id.
|
||||
# On other OSes, the user session id is not necessarily recorded at all kernel-side.
|
||||
# Using regular users in combination with /bin/su or /usr/bin/sudo ensure a clear audit track.
|
||||
PermitRootLogin yes # but we need it to login from dom0
|
||||
PermitRootLogin yes
|
||||
UseDNS no
|
||||
|
||||
# Use kernel sandbox mechanisms where possible in unprivilegied processes
|
||||
# Systrace on OpenBSD, Seccomp on Linux, seatbelt on MacOSX/Darwin, rlimit elsewhere.
|
||||
|
|
|
|||
1
vars/main.yml
Normal file
1
vars/main.yml
Normal file
|
|
@ -0,0 +1 @@
|
|||
root_group: "{% if ansible_os_family == 'FreeBSD' %}wheel{% else %}root{% endif %}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue