[Solved] ERROR A malformed block was encountered while loading a block

ERROR! A malformed block was encountered while loading a block
[[email protected] test]# ansible-playbook -C roles_redis.yml -i hosts
ERROR! A malformed block was encountered while loading a block

Reason:
You don’t add the follow code after include when you are write main file:

- include add_group.yml

Solution:

We must pay attention to the problem of space format. The specification is very strict

- include: add_group.yml

Read More: