mirror of
https://github.com/dev-sec/ansible-collection-hardening
synced 2024-11-10 09:14:18 +00:00
new feautre tmout in a new pr (#516)
Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> Co-authored-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
This commit is contained in:
parent
73d319cc79
commit
1a97c6cf87
4 changed files with 17 additions and 0 deletions
|
@ -250,6 +250,9 @@ We know that this is the case on Raspberry Pi.
|
|||
- `os_profile_enabled`
|
||||
- Default: `true`
|
||||
- Description: Set to false to disable installing and configuring profile.
|
||||
- `os_security_auto_logout`
|
||||
- Default: `0`
|
||||
- Description: Set timeout in seconds for logout users automatically after time. Setting this to `0` disables the timeout.
|
||||
- `os_securetty_enabled`
|
||||
- Default: `true`
|
||||
- Description: Set to false to disable installing and configuring securetty.
|
||||
|
|
|
@ -364,6 +364,9 @@ os_profile_enabled: true
|
|||
# Set to false to disable installing and configuring securetty.
|
||||
os_securetty_enabled: true
|
||||
|
||||
# Set timeout in seconds for logout users automatically after time. Setting this to `0` disables the timeout.
|
||||
os_security_auto_logout: 0
|
||||
|
||||
# Set to false to disable installing and configuring sysctl.
|
||||
os_sysctl_enabled: true
|
||||
|
||||
|
|
|
@ -13,3 +13,11 @@
|
|||
path: /etc/profile.d/pinerolo_profile.sh
|
||||
state: absent
|
||||
when: os_security_kernel_enable_core_dump | bool
|
||||
|
||||
- name: Add autologout to profile env
|
||||
template:
|
||||
src: 'etc/profile.d/tmout.sh.j2'
|
||||
dest: '/etc/profile.d/tmout.sh'
|
||||
owner: 'root'
|
||||
group: 'root'
|
||||
mode: '0750'
|
||||
|
|
3
roles/os_hardening/templates/etc/profile.d/tmout.sh.j2
Normal file
3
roles/os_hardening/templates/etc/profile.d/tmout.sh.j2
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Logout Timeout
|
||||
export TMOUT={{ os_security_auto_logout }}
|
||||
readonly TMOUT
|
Loading…
Reference in a new issue