Here is my variable list file vars/blah.yml:
--- stuff: - stuff1: bill stuff2: sue I just trying to get the values of the variable stuff.
Here's my playbook:
hosts: all become: yes vars_files: - vars/blah.yml tasks: - name: test debug: var: "{{ item.stuff1 }} {{ item.stuff2 }}" loop : - "{{ stuff }}" I'm getting this error.
fatal: [node1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'list object' has no attribute 'stuff1'\n\nThe error appears to be in '/home/automation/plays/test1.yml': line 11, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: test\n ^ here\n"} Can someone tell me what I'm doing wrong?
Edited the formatting on the variables. Still getting the same results.