{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/ansible-inventory/latest.json",
  "title": "Ansible Inventory Schema",
  "description": "See <https://docs.ansible.com/projects/ansible/latest/inventory_guide/intro_inventory.html>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/inventory.json",
    "sourceSha256": "2f1be91c9cb6690ace000ed779bc937bf7f74581ac60e3dd1992db68f64f3ba7",
    "fileMatch": [
      "inventory.yml",
      "inventory.yaml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "all": {
      "$ref": "#/$defs/special-group"
    },
    "ungrouped": {
      "$ref": "#/$defs/group"
    }
  },
  "$defs": {
    "group": {
      "properties": {
        "children": {
          "patternProperties": {
            "[a-zA-Z-_0-9]": {
              "$ref": "#/$defs/group"
            }
          }
        },
        "hosts": {
          "type": [
            "object",
            "string"
          ],
          "patternProperties": {
            "[a-zA-Z.-_0-9]": {
              "type": [
                "object",
                "null"
              ]
            }
          }
        },
        "vars": {
          "type": "object"
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "special-group": {
      "type": "object",
      "properties": {
        "children": {
          "type": [
            "object",
            "null"
          ]
        },
        "groups": {
          "type": [
            "object",
            "null"
          ]
        },
        "hosts": {
          "type": [
            "object",
            "null"
          ]
        },
        "vars": {
          "type": [
            "object",
            "null"
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": true,
  "markdownDescription": "All keys at top levels are groups with `all` and `ungrouped` having a special meaning.\n\nSee [How to build your inventory](https://docs.ansible.com/projects/ansible/latest/inventory_guide/intro_inventory.html)",
  "examples": [
    "inventory.yaml",
    "inventory.yml",
    "inventory/*.yml",
    "inventory/*.yaml"
  ]
}
