# platform = multi_platform_all
# reboot = true
# strategy = restrict
# complexity = low
# disruption = low

{{{ ansible_instantiate_variables("var_logind_session_timeout") }}}

{{% if product in ["sle15", "sle16"] %}}
# create drop-in in the /etc/systemd/logind.conf.d/ directory
{{% set logind_conf_file = "/etc/systemd/logind.conf.d/oscap-idle-sessions.conf" %}}
{{% else %}}
{{% set logind_conf_file = "/etc/systemd/logind.conf" %}}
{{% endif %}}

{{{ ansible_ini_file_set(logind_conf_file, "Login", "StopIdleSessionSec", "{{ var_logind_session_timeout }}") }}}
