error message in import playbook: this task 'import_playbook' has extra params

27 views
Skip to first unread message

Dmitriy Trubov

unread,
Aug 21, 2019, 12:39:23 PM8/21/19
to Ansible Development
Hi
I have error in importing playbook

TASK [Perform storage console playbook test] *****************************************************************************************************************************************************************************************************************
fatal: [XXXXX]: FAILED! => {"reason": "this task 'import_playbook' has extra params, which is only allowed in the following modules: shell, win_shell, include_vars, add_host, raw, include_role, meta, set_fact, include, import_tasks, script, import_role, include_tasks, group_by, command, win_command\n\nThe error appears to have been in '/scratch/xxxxx/fr-crosscomponent-role/playbooks/storage_console1.yml': line 7, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Precheck Storage Console\n  ^ here\n"}
        to retry, use: --limit @/scratch/dtrubov/fr-crosscomponent-role/playbooks/wrapper_19.1.0.retry

PLAY RECAP ***************************************************************************************************************************************************************************************************************************************************

___________________________________
Here is fragment of playbook
  - name: Perform storage console playbook test
    include_tasks: storage_console1.yml
    tags:
    - always
_________________________________________
It is calls task storage_console1.yml

- name: Storage console
  debug:
    msg: "Storage console playbook {{jsonConfig.playbook_root}} "
  tags:
  - always

- name: Precheck Storage Console
  import_playbook: "playbooks/test_playbook.yml"
__________________________________________________
Here is test_playbook

---
- name: Test Playbook

  hosts: all
  tasks:

  - name: Storage console
    debug:
      msg: "Test Play book"
    tags:
    - always

Test playbook works if running separately

What is wrong?

Thanks






Reply all
Reply to author
Forward
0 new messages