---- hosts: all# vars:# doreboots: true# zadmin_password: Today123zadmin# root_password: Today123pre_tasks:- debug:msg: "Playbook WILL REBOOT when requested."when: dorebootsroles:- setup_ansible_data
---doreboots: true
TASK [debug] *******************************************************************fatal: [system.example.com]: FAILED! => {"failed": true, "msg": "The conditional check 'doreboots' failed. The error was: error while evaluating conditional (doreboots): 'doreboots' is undefined\n\nThe error appears to have been in '/etc/ansible/roles/sysprep/test.yml': line 10, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n pre_tasks:\n - debug:\n ^ here\n"}
The conditional check 'doreboots' failed. The error was: error while evaluating conditional (doreboots): 'doreboots' is undefinedThe error appears to have been in '/etc/ansible/roles/sysprep/test.yml': line 10, column 7, but maybe elsewhere in the file depending on the exact syntax problem.The offending line appears to be:pre_tasks:- debug:^ here
---
doreboots: true
...