question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ansible - include_tasks: Incorrect type. Expected "object".

See original GitHub issue

Visual Studio code incorrectly flags syntax errors with include_tasks and import_tasks

Incorrect type. Expected “object”.

related to #96

- import_tasks: foo.yml

- name: manage_bar
  include_tasks: bar.yml

The Schema source extract: from https://github.com/SchemaStore/schemastore/pull/490/files

          "include_tasks": {
            "type": "object",
            "description": "Includes a file with a list of tasks to be executed in the current playbook.",
            "properties": {
              "free-form": {
                "type": "string",
                "description": "The name of the imported file is specified directly without any other option.\nUnlike M(import_tasks), most keywords, including loops and conditionals, apply to this statement."
              }
            }
          },

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
DanSibbernsencommented, Sep 2, 2021

FYI: if you’re not using a “name” field in any task, the error Missing property "include_vars".yaml-schema: Ansible 2.9 will show up. Adding the “name” field will remove it.

3reactions
ssbarneacommented, Oct 19, 2018

@shaded-enmity Check http://codesearch.openstack.org/?q=block%3A&i=nope&files=.yml&repos= for planty of examples of block usage inside playbooks, is very common.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ansible - Incorrect type. Expected "object" - Stack Overflow
This module prints statements during execution and can be useful for debugging variables or expressions without necessarily halting the playbook ...
Read more >
ansible.builtin.include_tasks module – Dynamically include a ...
include_tasks module – Dynamically include a task list . Note. This module is part of ansible-core and included in all Ansible installations....
Read more >
Use Ansible tags to save time on playbook runs - Red Hat
As a frequent Ansible user, I'm always looking at ways to simplify my playbooks and save time during playbook debugging.
Read more >
Ansible 2.2 Documentation - Read the Docs
Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or...
Read more >
Ansible 2.2 Documentation
equal to 'FALSE'. Do not rely on types set during definition, always make sure you specify type with a filter when.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found