Reputation: 55
I'm running a simple ansible playbook and getting an error:
ERROR: parse error: playbooks must be formatted as a YAML list, got type 'str'
---
- hosts: all
tasks:
- name: Get server availability by pinging it
ping:
- name: Get server hostname
command: hostname
Not sure where the problem is. Ansible v1.9.6
Upvotes: 1
Views: 5050
Reputation: 68229
Answer from comment: missing -i
flag in ansible-playbook hostname.yml inventory
.
Upvotes: 1