def broken_playbook(testdir):
    """
    Create minimal ansible playbook file with an error in it, so that the
    ``ansible-playbook`` would immediatelly fail when trying to execute it.
    """
    playbook = testdir.makefile(
        ".yml",
        "---",
        "- hosts: all",
        "  connection: local",
        "  tasks:",
        "   - nothing",  # here is the problem inserted on purpose
        )
    return playbook