github.com/lyraproj/hiera@v1.0.0-rc4/schema/hiera_v5.yaml (about)

     1  ---
     2  title: JSON schema for Hiera configuration
     3  "$schema": http://json-schema.org/draft-04/schema#
     4  type: object
     5  definitions:
     6    defaultsBase:
     7      description: Default values for the lookup function, datadir, and option keys, when those keys are omitted in the hierarchy levels.
     8      type: object
     9      properties:
    10        datadir:
    11          description: Default value for datadir, used for any file-based hierarchy level that doesn't specify its own.
    12          type: string
    13        plugindir:
    14          description: Default value for plugin, used for any file-based hierarchy level that doesn't specify its own.
    15          type: string
    16        options:
    17          description: Default value for options, used for any hierarchy level that does not specify its own.
    18          type: object
    19        data_dig:
    20          description: Default name of function that produces values key by key and digs into dotted key notations.
    21          type: string
    22        data_hash:
    23          description: Default name of function that produces a hash of key-value pairs.
    24          type: string
    25        lookup_key:
    26          description: Default name of function that produces values key by key.
    27          type: string
    28      additionalProperties: false
    29    levelBase:
    30      description: Hierarchy level.
    31      type: object
    32      properties:
    33        name:
    34          description: A name for this level, shown to humans in debug messages and --explain output.
    35          type: string
    36        datadir:
    37          description: The directory where data files are kept; can be omitted if you set a default
    38          type: string
    39        plugindir:
    40          description: The directory where plugins are kept; can be omitted when using embedded lookup functions or if you set a default
    41          type: string
    42        pluginfile:
    43          description: The file name of the plugin; can be omitted when using embedded lookup functions or if plugin is named after the function
    44          type: string
    45        options:
    46          description: Options to pass on to the data provider function
    47          type: object
    48        path:
    49          description: Path to the data file, relative to datadir.
    50          type: string
    51        paths:
    52          description: Paths to data files, relative to datadir.
    53          type: array
    54          items:
    55            type: string
    56        glob:
    57          description: Glob that expands to paths to data files, relative to datadir.
    58          type: string
    59        globs:
    60          description: Globs that expand to paths to data files, relative to datadir.
    61          type: array
    62          items:
    63            type: string
    64        uri:
    65          description: URI that appoints data or a lookup service.
    66          type: string
    67        uris:
    68          description: URIs that appoint data or a lookup services.
    69          type: array
    70          items:
    71            type: string
    72        mapped_paths:
    73          description: Array with exactly three string elements describing how to create
    74            paths from the elements of a collection.
    75          type: array
    76          items:
    77            - description: Name of a collection variable.
    78              type: string
    79            - description: Name of a variable to use in interpolation.
    80              type: string
    81            - description: Interpolation expression containing the named variable.
    82              type: string
    83          minItems: 3
    84          maxItems: 3
    85        data_dig:
    86          description: Name of function that produces values key by key and digs into dotted key notations.
    87          type: string
    88        data_hash:
    89          description: Name of function that produces a hash of key-value pairs.
    90          type: string
    91        lookup_key:
    92          description: Name of function that produces values key by key.
    93          type: string
    94      additionalProperties: false
    95      required:
    96        - name
    97    location:
    98      oneOf:
    99        - required:
   100            - path
   101        - required:
   102            - paths
   103        - required:
   104            - glob
   105        - required:
   106            - globs
   107        - required:
   108            - uri
   109        - required:
   110            - uris
   111        - required:
   112            - mappded_paths
   113        - not:
   114            anyOf:
   115              - required:
   116                  - path
   117              - required:
   118                  - paths
   119              - required:
   120                  - glob
   121              - required:
   122                  - globs
   123              - required:
   124                  - uri
   125              - required:
   126                  - uris
   127              - required:
   128                  - mappded_paths
   129    providerFunction:
   130      oneOf:
   131        - not:
   132            anyOf:
   133              - required:
   134                  - data_dig
   135              - required:
   136                  - data_hash
   137              - required:
   138                  - lookup_key
   139        - required:
   140            - data_dig
   141        - required:
   142            - data_hash
   143        - required:
   144            - lookup_key
   145    defaults:
   146      allOf:
   147        - "$ref": "#/definitions/defaultsBase"
   148        - "$ref": "#/definitions/providerFunction"
   149    level:
   150      allOf:
   151        - "$ref": "#/definitions/levelBase"
   152        - "$ref": "#/definitions/location"
   153        - "$ref": "#/definitions/providerFunction"
   154    hierarchy:
   155      description: An array of hashes, where each hash configures one level of the hierarchy.
   156      type: array
   157      items:
   158        "$ref": "#/definitions/level"
   159  properties:
   160    version:
   161      description: Required, must be the number 5, without quotes
   162      type: integer
   163      minimum: 5
   164      maximum: 5
   165    defaults:
   166      "$ref": "#/definitions/defaults"
   167    hierarchy:
   168      "$ref": "#/definitions/hierarchy"
   169    default_hierarchy:
   170      "$ref": "#/definitions/hierarchy"
   171  required:
   172    - version
   173  additionalProperties: false