# platform = multi_platform_rhel,multi_platform_fedora,multi_platform_ol,multi_platform_rhv
# reboot = false
# strategy = enable
# complexity = low
# disruption = low

{{% if SEBOOL_BOOL %}}
- name: Set SELinux boolean {{{ SEBOOLID }}} to {{{ SEBOOL_BOOL }}}
  seboolean:
    name: "{{{ SEBOOLID }}}"
    state: "{{{ SEBOOL_BOOL }}}"
    persistent: yes
{{% else %}}
- (xccdf-var var_{{{ SEBOOLID }}})

{{% if product == "rhel8" %}}
- name: Ensure python3-libsemanage installed
  package:
    name: python3-libsemanage
    state: present
{{% else %}}
- name: Ensure libsemanage-python installed
  package:
    name: libsemanage-python
    state: present
{{% endif %}}
- name: Set SELinux boolean {{{ SEBOOLID }}} accordingly
  seboolean:
    name: {{{ SEBOOLID }}}
    state: "{{ var_{{{ SEBOOLID }}} }}"
    persistent: yes
{{% endif %}}
