# platform = multi_platform_almalinux,multi_platform_fedora,multi_platform_ol,multi_platform_rhel,multi_platform_rhv,SUSE Linux Enterprise 15,SUSE Linux Enterprise 16
# reboot = false
# strategy = enable
# complexity = low
# disruption = low

{{% if product in ['ol8', 'ol9', 'rhel8', 'rhel9', 'rhel10'] %}}
{{{ bash_package_install("python3-libsemanage") }}}
{{% elif product in [ "sle15", "sle16" ] %}}
{{{ bash_package_install("libsemanage2") }}}
{{% else %}}
{{{ bash_package_install("libsemanage-python") }}}
{{% endif %}}

# Workaround for https://github.com/OpenSCAP/openscap/issues/2242: Use full
# path to setsebool command to avoid the issue with the command not being
# found.
{{% if SEBOOL_BOOL %}}
    /usr/sbin/setsebool -P {{{ SEBOOLID }}} {{{ SEBOOL_BOOL }}}
{{% else %}}
    {{{ bash_instantiate_variables("var_" + SEBOOLID) }}}
    /usr/sbin/setsebool -P {{{ SEBOOLID }}} $var_{{{ SEBOOLID }}}
{{% endif %}}
