On 9/4/19 3:46 PM, Keith Mills wrote:
> 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

> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to
> [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/7facd55b-c7b9-4290-af03-8139924eeb6e%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/7facd55b-c7b9-4290-af03-8139924eeb6e%40googlegroups.com?utm_medium=email&utm_source=footer>.


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ec6eb5d0-514d-2ab3-7062-0c9f56ad0586%40linuxia.de.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to