I have a simple scenario that fails, but I can’t figure out why. Here’s the command line invocation and the result:
[root@cluster-mgmt tasks]# ansible-playbook -i ./hosts main.yml
PLAY [CLUSTERS team downtime orchestration play] ********************************************************************************************************************
TASK [Gathering Facts] **********************************************************************************************************************************************
ok: [localhost]
TASK [set nagios downtime] ******************************************************************************************************************************************
fatal: [localhost]: FAILED! => {“msg”: “The task includes an option with an undefined variable. The error was: ‘myTestVar’ is undefined\n\nThe error appears to have been in ‘/autofs/nccs-svm1_home1/tw58/SANDBOX/ANSIBLE_VARDIR/testVar/tasks/main.yml’: line 9, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n tasks:\n - name: set nagios downtime\n ^ here\n”}
[WARNING]: Could not create retry file ‘/autofs/nccs-svm1_home1/tw58/SANDBOX/ANSIBLE_VARDIR/testVar/tasks/main.retry’. [Errno 13] Permission denied:
u’/autofs/nccs-svm1_home1/tw58/SANDBOX/ANSIBLE_VARDIR/testVar/tasks/main.retry’
PLAY RECAP **********************************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1
The playbook is simple: