Ah,
now I see what you mean - got it working! Thanks so much for the hand!
kind regards,
T
On Monday, February 10, 2020 at 4:33:14 PM UTC-5, misterT1958 wrote:
>
> 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:
>
> ---
> # tasks file for testVar
>
> - hosts: localhost
> name: CLUSTERS team downtime orchestration play
> gather_facts: true
>
> tasks:
> - name: set nagios downtime
> debug:
> msg: "the value of the variable {{ myTestVar }}"
>
> and the variable definition file is even more simple:
>
> [root@cluster-mgmt vars]# more main.yml
> ---
> # vars file for testVar
> myTestVar: 58
>
> This is my directory tree:
>
> [root@cluster-mgmt testVar]# tree
> .
> ├── ansible.cfg
> ├── defaults
> │ └── main.yml
> ├── files
> ├── handlers
> │ └── main.yml
> ├── hosts
> ├── meta
> │ └── main.yml
> ├── README.md
> ├── tasks
> │ ├── ansible.cfg -> ../ansible.cfg
> │ ├── hosts -> ../hosts
> │ └── main.yml
> ├── templates
> ├── tests
> │ ├── inventory
> │ └── test.yml
> └── vars
> └── main.yml
>
> Been staring at this all day, trying different things, always get the
> "undefined variable"!!
>
> Does anybody out there see the problem?
>
> Thanks
> T
>
--
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/b4e3325a-a426-4a04-9b62-5738b36b5bb9%40googlegroups.com.