Hello, I am an ansible newbie and I am trying to understand how to work with dicts.
The following playbook produces a syntax error, and we're not sure why: ansible-playbook --version *ansible-playbook 1.5.3ansible-playbook -i ~/.ansible-hosts dict.yml --syntax-check* *ERROR: parse error: playbooks must be formatted as a YAML list, got <type 'dict'>* And here is the playbook (used from the ansible documentation) at http://docs.ansible.com/playbooks_loops.html#looping-over-hashes: --- users: alice: name: Alice Appleworth telephone: 123-456-7890 bob: name: Bob Bananarama telephone: 987-654-3210 tasks: - name: Print phone records debug: msg="User {{ item.key }} is {{ item.value.name }} ({{ item.value.telephone }})" *with_dict*: users Any help with this is highly appreciated. Thanks! -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/fd9647de-527e-4ef4-be60-f5ee4c27f4dc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
