1

Ansible version: 2.9

Play book

---
- { include_tasks: test.yml }

Error

The error appears to have been in '/path/to/main.yml': line 34, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- { include_tasks: test.yml}
  ^ here
'}}

Fighting with this for few days! Please rescue.

Shahid Karimi
  • 4,096
  • 17
  • 62
  • 104

1 Answers1

1

What you posted is not a playbook. You need to list hosts and tasks:

---
- hosts: all
  tasks:
  - include_tasks: test.yml
Jack
  • 5,801
  • 1
  • 15
  • 20
  • If you absolutely wanted to use inline syntax (even if I wouldn't see why), you could use : `- {hosts: all, tasks: [{include_tasks: test.yml}]}` – rolf82 Mar 15 '20 at 18:15