Set SELinux to permissive mode and reboot.

Hello All,

I need to set SELinux to permissive mode and reboot. When I run my playbook I get an error.

Playbook:

>
---
-name:SetSELinuxto permissive mode.
selinux:
policy:targeted
state:permissive
when:ansible_selinux_python_present|bool
-name:Reboot
selinux:
when:reboot_required|bool
>

Error:

>
TASK [buildservers
:Reboot]************************************************************************************************************************************************
fatal:[abls15ex]:FAILED!=>{"msg":"The conditional check 'reboot_required|bool' failed. The error was: error while
evaluating conditional (reboot_required|bool): 'reboot_required' is undefined\n\nThe error appears to be in
'/home/jamekeit/ds9/roles/buildservers/tasks/selinux.yaml': line 7, column 3, but may\nbe elsewhere in the file
depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n when:
ansible_selinux_python_present|bool\n- name: Reboot\n ^ here\n"}

>

Can anyone help?

Apparently the variable "reboot_required" is not defined. Either set a default value or try

reboot_required | default(false) | bool

Regards
        Racke