--- - hosts: localhost name: This is a playbook # <-- name key should be the first one tasks: - name: A block when: true block: - name: Display a message ansible.builtin.debug: msg: Hello world!