Maxim Makivchuk
Maxim Makivchuk

Reputation: 55

Error on simple ansible play-book

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

Answers (1)

Konstantin Suvorov
Konstantin Suvorov

Reputation: 68229

Answer from comment: missing -i flag in ansible-playbook hostname.yml inventory.

Upvotes: 1

Related Questions