ERROR! this task 'import_playbook' has extra params

I can’t figure out why this is failing… syntax is correct as far as I can see. I could use another pair of eyes.

ERROR:

`
ERROR! this task ‘import_playbook’ has extra params, which is only allowed in the following modules: command, win_command, shell, win_shell, script, include, include_vars, include_tasks, include_role, import_tasks, import_role, add_host, group_by, set_fact, raw, meta

The offending line appears to be:

tasks file for user rights

  • import_playbook: /playbooks/one-offs/update_gitlab_scripts.yml

`

Top part of playbook:

- import_playbook: /playbooks/one-offs/update_gitlab_scripts.yml`

`

The following also fails:

- import_playbook: update_gitlab_scripts.yml`

`

So, the last is pretty basic… unsure why it is throwing the error that it is throwing. This is in the r

Previous comment cut off… here is what it was supposed to say

import_playbook is only allowed in a playbook on top level, not in a role.

I was wondering that myself, but the docs showed examples doing otherwise… but I couldn’t get it to work. I need to call the playbook before roles, which also seems to fail. Do you know of a way to import_playbook before executing a role or set of roles?

If you look at the documentation carefully you see the example has this name
"- name: This DOES NOT WORK"