Problem solved, had to use "import_tasks" instead of "import_playbook".

On Monday, 5 March 2018 15:00:21 UTC+5:30, kavya KULSHRESHTHA wrote:
>
> Hi,
>
> I am using ansible 2.4.4
>
> I have a role, where in main.yml I am importing two playbooks:
>
> main.yml:
> ---
> - import_playbook: prerequisites.yml
> - import_playbook: install.yml
>
> But, I am getting below error:
> The error appears to have been in 
> '/LidoFlight/lms/lms_dev_clone/playbooks/roles/prometheus/tasks/main.yml': 
> line 2, column 3, but may
> be elsewhere in the file depending on the exact syntax problem.
>
> The offending line appears to be:
>
> ---
> - import_playbook: prerequisites.yml
>   ^ here
>
> exception type: <class 'ansible.errors.AnsibleParserError'>
> exception: 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
>
>
>
> Prior to it, I was using ansible 2.2.1.0 with "include" instead of 
> "import_playbook"
>
> Please help me to know what is wrong with "import_playbook"
>
>
> Regards,
> Kavya K
>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a600219b-fb8a-45be-be22-59a56fe41e36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to