summaryrefslogtreecommitdiffstats
path: root/src/ansiblelint/schemas/inventory.json
blob: 80333ce84bee0e99d0e685a8b4a25add2b93147c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
  "$defs": {
    "group": {
      "properties": {
        "children": {
          "patternProperties": {
            "[a-zA-Z-_0-9]": {
              "$ref": "#/$defs/group"
            }
          }
        },
        "hosts": {
          "patternProperties": {
            "[a-zA-Z.-_0-9]": {
              "type": ["object", "null"]
            }
          },
          "type": ["object", "string"]
        },
        "vars": {
          "type": "object"
        }
      },
      "type": ["object", "null"]
    },
    "special-group": {
      "additionalProperties": false,
      "properties": {
        "children": {
          "type": ["object", "null"]
        },
        "groups": {
          "type": ["object", "null"]
        },
        "hosts": {
          "type": ["object", "null"]
        },
        "vars": {
          "type": ["object", "null"]
        }
      },
      "type": "object"
    }
  },
  "$id": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/inventory.json",
  "$schema": "http://json-schema.org/draft-07/schema",
  "additionalProperties": true,
  "description": "Ansible Inventory Schema",
  "examples": [
    "inventory.yaml",
    "inventory.yml",
    "inventory/*.yml",
    "inventory/*.yaml"
  ],
  "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/ansible/latest/inventory_guide/intro_inventory.html)",
  "properties": {
    "all": {
      "$ref": "#/$defs/special-group"
    },
    "ungrouped": {
      "$ref": "#/$defs/group"
    }
  },
  "title": "Ansible Inventory Schema",
  "type": "object"
}